21 #include <sys/times.h>
99 void add(
double cpuTime,
double realTime);
111 clock_t StartCPUTime;
112 time_t StartRealTime;
double CPUTime()
Returns CPU time from previous start in seconds.
Definition: Timer.cpp:124
void add(double cpuTime, double realTime)
Adds time to buffer (only when a computation is restarted).
Definition: Timer.cpp:173
double stop()
Stop timer and, if asked, returns CPU time from previous start in seconds.
Definition: Timer.cpp:77
double realTime()
Returns real time from previous start in seconds.
Definition: Timer.cpp:148
Timer()
Constructor of Timer class. Initialize timer.
Definition: Timer.cpp:30
void resetStart()
Resets time and start.
Definition: Timer.cpp:46
void start()
Starts timer.
Definition: Timer.cpp:62
void check()
Adds CPU time and real time to their buffers and resets. For long computations, it is recommended to ...
Definition: Timer.cpp:103
An object Timer gives information on the CPU time of long-time computations.
Definition: Timer.h:31