|
Frobby
0.9.5
|
Measures spans of CPU time. More...
#include <Timer.h>
Public Member Functions | |
| Timer () | |
| void | reset () |
| Resets the amount of elapsed CPU time to zero. More... | |
| unsigned long | getMilliseconds () const |
| Returns the number of CPU milliseconds since the last reset. More... | |
| void | print (FILE *out) const |
| Prints the elapsed time in a human readable format. More... | |
Private Attributes | |
| std::clock_t | _clocksAtReset |
Measures spans of CPU time.
The internal record of time can overflow quickly. If clock_t is 32 bits unsigned and CLOCKS_PER_TIC is one million then overflow will occur after 71 minutes.
| unsigned long Timer::getMilliseconds | ( | ) | const |
| void Timer::print | ( | FILE * | out | ) | const |
|
inline |