57 struct timeval _time1, _time2;
double get_cpu_time(void) const
Get cpu time elapsed in seconds.
double get_real_time(void) const
Get real time elapsed in seconds.
~Timer()
Destruct timer.
Definition: timer.hpp:67
void start(void)
Start timer.
Timer()
Construct and start timer.
friend std::ostream & operator<<(std::ostream &os, const Timer &t)
Print report of elapsed time to stream.
void stop(void)
Stop timer.
Class for measuring code runtime in cpu time and realtime.
Definition: timer.hpp:54