Utilitary class providing algorithm timing functionality. More...
#include <cpu_timer.h>
Public Types | |
typedef boost::timer::nanosecond_type | NanosecondType |
Nanosecond data type (int_least64_t) | |
Public Member Functions | |
CpuTimer () | |
Default constructor. More... | |
~CpuTimer () | |
Destructor - void implementation. | |
void | Stop () |
Stops the timer. | |
void | Reset () |
Resets the timer. | |
NanosecondType | GetDuration () const |
Returns the elapsed user process time (in nanoseconds) More... | |
std::string | ToString () const |
Returns the elapsed user process time as a formatted string (HH::MM::SS.mmm) More... | |
Static Public Member Functions | |
static std::string | ToString (CpuTimer::NanosecondType userTime) |
Returns the elapsed user process time as a formatted string (HH::MM::SS.mmm) More... | |
Private Member Functions | |
CpuTimer (CpuTimer const &) | |
Copy constructor - not implemented. | |
CpuTimer | operator= (CpuTimer const &) |
Copy assignment operator - not implemented. | |
Private Attributes | |
boost::timer::cpu_timer | timer |
the internal timer variable | |
Utilitary class providing algorithm timing functionality.
Definition at line 47 of file cpu_timer.h.
SeComLib::Utils::CpuTimer::CpuTimer | ( | ) |
CpuTimer::NanosecondType SeComLib::Utils::CpuTimer::GetDuration | ( | ) | const |
Returns the elapsed user process time (in nanoseconds)
Definition at line 56 of file cpu_timer.cpp.
std::string SeComLib::Utils::CpuTimer::ToString | ( | ) | const |
Returns the elapsed user process time as a formatted string (HH::MM::SS.mmm)
Definition at line 63 of file cpu_timer.cpp.
|
static |
Returns the elapsed user process time as a formatted string (HH::MM::SS.mmm)
userTime | a time duration expressed in nanoseconds |
Format the output string
Definition at line 71 of file cpu_timer.cpp.