Improve the timer class
Use std::chrono::steady_clock
instead of evaluating the CPU timers.
This leads to a more accurate clock and portable code.
It would be possible to change returned durations to use the clock's duration
type. However that would require changing all callers, instead it still
returns a double
to be a drop in replacement.
Some minor janitorial changes:
- Make all members variables private
- Use consistent naming for member variables
- Remove the declaration of print_time since it's not defined
- Replace
unsigned long long
withuint64_t
Edited by Mark de Wever