Go to the documentation of this file.
15 #ifndef TUE_PROFILING_TIMER_H_
16 #define TUE_PROFILING_TIMER_H_
18 #ifdef WIN32 // Windows system specific
20 #else // Unix based system specific
88 static long double now();
101 LARGE_INTEGER frequency_;
106 LARGE_INTEGER startCount_;
111 LARGE_INTEGER endCount_;
127 #define TIMER_START Timer t; t.start();
128 #define TIMER_STOP(x) (t. printLastElapsedTime(x))
129 #define TIMER_STOP_M(x) (t.printLastElapsedTimeMSec(x))
131 #endif // TUE_PROFILING_TIMER_H_
long double getElapsedTime() const
Alias of Timer::getElapsedTimeInSec.
long double getElapsedTimeInSec() const
Get elasped time in seconds.
bool running() const
Get running status of the timer.
void printLastElapsedTimeMSec(std::string)
timeval start_count_
Start counter.
static long double nowMicroSec()
Get the current time in micro-seconds since epoch.
static long double nowMilliSec()
Get the current time in milli-seconds since epoch.
long double getElapsedTimeInMicroSec() const
Get elasped time in micro-seconds.
timeval end_count_
End counter.
long double getElapsedTimeInMilliSec() const
Get elasped time in milli-seconds.
static long double now()
Get the current time in seconds since epoch.
bool running_
Running flag.
void printLastElapsedTime(std::string)