TimeStamp
Declared in lemon/time_measure.h, in the group Time Measuring and Counting; the same class on the Doxygen site.
-
class TimeStamp
A class to store (cpu)time instances.
This class stores five time values.
a real time
a user cpu time
a system cpu time
a user cpu time of children
a system cpu time of children
The real time is that of
std::chrono::steady_clock, and the user cpu time is the processor time of the process thatstd::clock()gives, which also counts the time spent in the system on its behalf; the other three are zero, as no standard facility gives them.TimeStamp’s can be added to or substracted from each other and they can be pushed to a stream.
In most cases, perhaps the Timer or the TimeReport class is what you want to use instead.
Public Types
Public Functions
-
inline void stamp()
Read the current time values of the process.
-
inline TimeStamp()
Constructor initializing with zero.
-
inline TimeStamp(void*)
Constructor initializing with the current time values of the process.
-
inline double userTime() const
Gives back the user time of the process.
-
inline double systemTime() const
Gives back the system time of the process.
-
inline double cUserTime() const
Gives back the user time of the process’ children.
Note
It is always zero, as no standard facility gives it.
-
inline double cSystemTime() const
Gives back the user time of the process’ children.
Note
It is always zero, as no standard facility gives it.
-
inline double realTime() const
Gives back the real time.