27 _start = std::chrono::high_resolution_clock::now();
43 template<
typename Rep =
double,
typename Period = std::ratio<1>>
46 auto t = std::chrono::high_resolution_clock::now();
52 return std::chrono::duration_cast<
53 std::chrono::duration<Rep, Period>>(t - _start)
59 bool _started =
false;
60 std::chrono::time_point<std::chrono::high_resolution_clock> _start;
void tick()
Start the timer.
Definition: Timer.h:24
A simple timer.
Definition: Timer.h:17
Rep tock()
Stop the timer and return the elapsed time.
Definition: Timer.h:44