Process usage timer for Posix This is based on getrusage and thus returns detailed timing information about how the time was spend (userland, system time).
#include <Timer.h>
Public Member Functions | |
UsageTimer () | |
void | start () |
void | restart () |
void | stop () |
void | reset () |
double | getElapsed () |
double | getElapsedUserTime () |
double | getElapsedSystemTime () |
Protected Member Functions | |
void | getElapsedTimes () |
Protected Attributes | |
struct rusage start_usage | current_usage |
double | user_time |
double | sys_time |
double | elapsed |
bool | is_running |
Static Protected Attributes | |
static const int | who = RUSAGE_SELF |
mio::UsageTimer::UsageTimer | ( | ) |
double mio::UsageTimer::getElapsed | ( | ) |
double mio::UsageTimer::getElapsedSystemTime | ( | ) |
|
protected |
double mio::UsageTimer::getElapsedUserTime | ( | ) |
void mio::UsageTimer::reset | ( | ) |
void mio::UsageTimer::restart | ( | ) |
void mio::UsageTimer::start | ( | ) |
void mio::UsageTimer::stop | ( | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |