This class is used to measure the processor time used by the program. More...
#include <utils.h>
Public Member Functions | |
double | elapsed () const |
void | restart () |
Timer () |
Detailed Description
This class is used to measure the processor time used by the program.
The accuracy of the timer is dependent on the implementation of the ANSI C-function clock() by your compiler and your platform. You may count on milli-second accuracy. Different platforms provide more accurate timer functions, which can be used if the accuracy is a prime objective.
When compiled with Visual C++, the timer is returning the elapsed time - which is not the expected ANSI behavior!
Other compilers and platforms return the consumed cpu time, as expected. When the load on a machine is low, the consumed cpu-time and the elapsed time are close to each other. On a system with a higher load, the elapsed time deviates a lot from the consumed cpu-time.
Constructor & Destructor Documentation
frepple::utils::Timer::Timer | ( | ) | [inline, explicit] |
Member Function Documentation
double frepple::utils::Timer::elapsed | ( | ) | const [inline] |
void frepple::utils::Timer::restart | ( | ) | [inline] |
The documentation for this class was generated from the following file:
Documentation generated for frePPLe by
