Simple timer with millisecond precision. More...
#include <timer.h>
Public Member Functions | |
Timer () | |
Create a new timer and reset it. | |
void | reset () |
Reset the timer to the current time. | |
double | elapsed () const |
Return the number of milliseconds elapsed since the timer was last reset. | |
std::string | elapsedString (bool precise=false) const |
Like elapsed(), but return a human-readable string. | |
double | lap () |
Return the number of milliseconds elapsed since the timer was last reset and then reset it. | |
std::string | lapString (bool precise=false) |
Like lap(), but return a human-readable string. | |
Simple timer with millisecond precision.
This class is convenient for collecting performance data