Heidelberg Educational Numerics Library Version 0.24 (from 9 September 2011)
|
A simple stop watch. More...
#include <timer.hh>
Public Member Functions | |
Timer () throw (TimerError) | |
A new timer, start immediately. | |
void | reset () throw (TimerError) |
Reset timer. | |
double | elapsed () const throw (TimerError) |
Get elapsed user-time in seconds. |
A simple stop watch.
This class reports the elapsed user-time, i.e. time spent computing, after the last call to Timer::reset(). The results are seconds and fractional seconds. Note that the resolution of the timing depends on your OS kernel which should be somewhere in the milisecond range.
The class is basically a wrapper for the libc-function getrusage()
Taken from the DUNE project www.dune-project.org