Public Member Functions | |
void | start () |
Start the timer. More... | |
void | stop () |
Stop the timer. More... | |
void | sync () |
Update fields such that running(), clock_tick(), elapsed(), elapsed_real() will return recent measurements. More... | |
void | reset () |
Reset the timer to zero. More... | |
double | user_time () |
Linux: Query the amount of time spent by this process in user mode since the timer was reset. More... | |
double | system_time () |
Linux: Query the amount of time spent by this process in kernel mode since the timer was reset. More... | |
double | wall_time () |
Query the amount of wall clock time spent by this process since the timer was reset. More... | |
bool | running () const |
Tell whether the timer is currently running. More... | |
long | clock_tick () const |
Return number of ticks per wall clock second as reported by the OS. More... | |
tms | last_sync () const |
Return the timestamp of last sync. More... | |
tms | elapsed () const |
Return the timestamp indicating the elapsed time. Only useful on Linux. More... | |
clock_t | last_sync_real () const |
Return the wall clock timestamp of the last sync. More... | |
clock_t | elapsed_real () const |
Return the elapsed wall clock time at the last sync. More... | |
Definition at line 52 of file cpu_timer.h.
|
inline |
Return number of ticks per wall clock second as reported by the OS.
Definition at line 126 of file cpu_timer.h.
|
inline |
Return the timestamp indicating the elapsed time. Only useful on Linux.
Definition at line 140 of file cpu_timer.h.
|
inline |
Return the elapsed wall clock time at the last sync.
Definition at line 154 of file cpu_timer.h.
|
inline |
Return the timestamp of last sync.
Definition at line 133 of file cpu_timer.h.
|
inline |
Return the wall clock timestamp of the last sync.
Definition at line 147 of file cpu_timer.h.
void tpie::cpu_timer::reset | ( | ) |
Reset the timer to zero.
|
inline |
Tell whether the timer is currently running.
Definition at line 119 of file cpu_timer.h.
void tpie::cpu_timer::start | ( | ) |
Start the timer.
void tpie::cpu_timer::stop | ( | ) |
Stop the timer.
void tpie::cpu_timer::sync | ( | ) |
Update fields such that running(), clock_tick(), elapsed(), elapsed_real() will return recent measurements.
double tpie::cpu_timer::system_time | ( | ) |
Linux: Query the amount of time spent by this process in kernel mode since the timer was reset.
Windows: Query the amount of wall clock time spent by this process since the timer was reset.
double tpie::cpu_timer::user_time | ( | ) |
Linux: Query the amount of time spent by this process in user mode since the timer was reset.
Windows: Query the amount of wall clock time spent by this process since the timer was reset.
double tpie::cpu_timer::wall_time | ( | ) |
Query the amount of wall clock time spent by this process since the timer was reset.