#include <spot/misc/timer.hh>
|
void | start () |
| Start a time interval.
|
|
void | stop () |
| Stop a time interval and update the sum of all intervals.
|
|
clock_t | utime () const |
| Return the user time of the current process (without children) of all accumulated interval.
|
|
clock_t | cutime () const |
| Return the user time of children of all accumulated interval.
|
|
clock_t | stime () const |
| Return the system time of the current process (without children) of all accumulated interval.
|
|
clock_t | cstime () const |
| Return the system time of children of all accumulated interval.
|
|
clock_t | get_uscp (bool user, bool system, bool children, bool parent) const |
|
bool | is_running () const |
| Whether the timer is running.
|
|
std::chrono::milliseconds::rep | walltime () const |
| Return cumulative wall time.
|
|
|
time_info | start_ |
|
time_info | total_ |
|
bool | running |
|
std::chrono::steady_clock::time_point | wall_start_ |
|
std::chrono::milliseconds::rep | wall_cumul_ = 0 |
|
A timekeeper that accumulate interval of time in a more detailed way. For instance, you can get the time spent with or without children processes.
◆ cstime()
clock_t spot::timer::cstime |
( |
| ) |
const |
|
inline |
Return the system time of children of all accumulated interval.
Any time interval that has been start()ed but not stop()ed will not be accounted for.
◆ cutime()
clock_t spot::timer::cutime |
( |
| ) |
const |
|
inline |
Return the user time of children of all accumulated interval.
Any time interval that has been start()ed but not stop()ed will not be accounted for.
◆ is_running()
bool spot::timer::is_running |
( |
| ) |
const |
|
inline |
Whether the timer is running.
◆ start()
void spot::timer::start |
( |
| ) |
|
|
inline |
◆ stime()
clock_t spot::timer::stime |
( |
| ) |
const |
|
inline |
Return the system time of the current process (without children) of all accumulated interval.
Any time interval that has been start()ed but not stop()ed will not be accounted for.
◆ stop()
void spot::timer::stop |
( |
| ) |
|
|
inline |
Stop a time interval and update the sum of all intervals.
◆ utime()
clock_t spot::timer::utime |
( |
| ) |
const |
|
inline |
Return the user time of the current process (without children) of all accumulated interval.
Any time interval that has been start()ed but not stop()ed will not be accounted for.
◆ walltime()
std::chrono::milliseconds::rep spot::timer::walltime |
( |
| ) |
const |
|
inline |
Return cumulative wall time.
When using multithreading the cpu time is not relevant and we have to deal with wall time to have an effective timer
The documentation for this class was generated from the following file: