cprover
Toggle main menu visibility
Loading...
Searching...
No Matches
timestamper.h
Go to the documentation of this file.
1
4
5
#ifndef CPROVER_UTIL_TIMESTAMPER_H
6
#define CPROVER_UTIL_TIMESTAMPER_H
7
8
#ifdef _WIN32
9
#define OPT_TIMESTAMP ""
10
#define HELP_TIMESTAMP ""
11
#else
12
#define OPT_TIMESTAMP "(timestamp):"
13
14
# define HELP_TIMESTAMP \
15
" {y--timestamp} [{ymonotonic}|{ywall}] \t " \
16
"print microsecond-precision timestamps. {ymonotonic}: stamps increase " \
17
"monotonically. {ywall}: ISO-8601 wall clock timestamps.\n"
18
#endif
19
20
#include <memory>
21
#include <string>
22
41
class
timestampert
42
{
43
public
:
45
enum class
clockt
46
{
48
NONE
,
50
MONOTONIC
,
52
WALL_CLOCK
53
};
54
virtual
~timestampert
() =
default
;
55
57
virtual
std::string
stamp
()
const
58
{
59
return
""
;
60
}
61
63
static
std::unique_ptr<const timestampert>
make
(
clockt
clock_type);
64
};
65
66
#ifndef _WIN32
67
class
monotonic_timestampert
:
public
timestampert
68
{
69
public
:
72
virtual
std::string
stamp
()
const override
;
73
};
74
75
class
wall_clock_timestampert
:
public
timestampert
76
{
77
public
:
80
virtual
std::string
stamp
()
const override
;
81
};
82
#endif
83
84
#endif
/* CPROVER_UTIL_TIMESTAMPER_H */
monotonic_timestampert
Definition
timestamper.h:68
monotonic_timestampert::stamp
virtual std::string stamp() const override
See HELP_TIMESTAMP in util/timestamper.h for time stamp format.
Definition
timestamper.cpp:41
timestampert
Timestamp class hierarchy.
Definition
timestamper.h:42
timestampert::clockt
clockt
Derived types of timestampert.
Definition
timestamper.h:46
timestampert::clockt::MONOTONIC
@ MONOTONIC
monotonic_timestampert
Definition
timestamper.h:50
timestampert::clockt::WALL_CLOCK
@ WALL_CLOCK
wall_clock_timestampert
Definition
timestamper.h:52
timestampert::clockt::NONE
@ NONE
timestampert
Definition
timestamper.h:48
timestampert::~timestampert
virtual ~timestampert()=default
timestampert::make
static std::unique_ptr< const timestampert > make(clockt clock_type)
Factory method to build timestampert subclasses.
Definition
timestamper.cpp:19
timestampert::stamp
virtual std::string stamp() const
Default timestamp: the empty string.
Definition
timestamper.h:57
wall_clock_timestampert
Definition
timestamper.h:76
wall_clock_timestampert::stamp
virtual std::string stamp() const override
See HELP_TIMESTAMP in util/timestamper.h for time stamp format.
Definition
timestamper.cpp:57
util
timestamper.h
Generated by
1.17.0