62 GUM_CONSTRUCTOR(
Timer);
72 GUM_DESTRUCTOR(
Timer);
86 auto sec = fmod(d, 60);
88 auto minut = fmod(d, 60);
92 s << std::setfill(
'0') << std::setw(2) << int(d) <<
":";
93 s << std::setfill(
'0') << std::setw(2) << int(minut) <<
":";
94 s << ((sec < 10) ?
"0" :
"") << sec;
std::string toString() const
Returns the delta time between now and the last reset() in a human format.
void reset()
Reset the timer.
bool sleeping_
False if running.
std::chrono::high_resolution_clock::time_point pause_
Time of the last call to pause().
double step() const
Returns the delta time between now and the last reset() call (or the constructor).
Timer()
Default constructor (launching the timer).
std::chrono::high_resolution_clock::time_point start_
Time of the last call to reset() or the constructor.
Timer & operator=(const Timer &timer)
Copy operator.
gum is the global namespace for all aGrUM entities
Class used to compute response times for benchmark purposes.