40 struct timeval _begin, _end;
43 static double diff(
const struct timeval& end,
const struct timeval& begin) {
44 return (end.tv_sec - begin.tv_sec) + 1e-6 * (end.tv_usec - begin.tv_usec);
143 double elapsed()
const {
return 0; }
151 #endif // GAIA_TIMER_H double elapsed() const
Returns the cumulative number of seconds elapsed between each call to the start()/stop() pair...
Definition: timer.cpp:51
void restart()
Restarts the timer.
Definition: timer.h:62
void start()
Starts the timer.
Definition: timer.cpp:32
Timer()
The constructor of the class.
Definition: timer.cpp:25
Main Gaia namespace, which contains all the library functions.
Definition: addfield.cpp:22
void reset()
Reset the total to 0.
Definition: timer.cpp:37
void stop()
Stops the timer.
Definition: timer.cpp:42
This class allows you to measure a certain amount of time, for instance if you want to know how long ...
Definition: timer.h:38