34 _start = std::chrono::high_resolution_clock::now();
35 _pause = std::chrono::high_resolution_clock::now();
43 std::chrono::duration< double, std::milli > ms;
48 ms = std::chrono::high_resolution_clock::now() -
_start;
49 return ms.count() / 1000.0;
55 _pause = std::chrono::high_resolution_clock::now();
65 _start += std::chrono::high_resolution_clock::now() -
_pause;
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).
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
void reset()
Reset the timer.
double pause()
Pause the timer and return the delta (.
bool _sleeping
False if running.
double resume()
Resume the timer and return the delta (.
std::chrono::high_resolution_clock::time_point _start
Time of the last call to reset() or the constructor.