#include <NanoTimer.h>
Public Member Functions | |
NanoTimer () | |
void | reset () |
void | start () |
void | stop () |
long long | last () |
long long | avg () |
long long | min () |
long long | max () |
Definition at line 20 of file NanoTimer.h.
NanoTimer::NanoTimer | ( | ) | [inline] |
Definition at line 27 of file NanoTimer.h.
References reset().
00027 { reset(); }
Here is the call graph for this function:
long long NanoTimer::avg | ( | ) | [inline] |
long long NanoTimer::last | ( | ) | [inline] |
long long NanoTimer::max | ( | ) | [inline] |
long long NanoTimer::min | ( | ) | [inline] |
void NanoTimer::reset | ( | ) | [inline] |
Definition at line 28 of file NanoTimer.h.
Referenced by NanoTimer().
Here is the caller graph for this function:
void NanoTimer::start | ( | ) | [inline] |
void NanoTimer::stop | ( | ) | [inline] |
Definition at line 34 of file NanoTimer.h.
00035 { 00036 clock_gettime(CLOCK_REALTIME, &end); 00037 long long secs = end.tv_sec-begin.tv_sec; 00038 long long nano = end.tv_nsec-begin.tv_nsec; 00039 last_ = (secs*1000000000)+nano; 00040 total += last_; 00041 if ( max_ < last_ ) max_ = last_; 00042 if ( min_ > last_ ) min_ = last_; 00043 }