15 #ifndef SERIALBOX_CORE_TIMER_H 16 #define SERIALBOX_CORE_TIMER_H 29 Timer() : start_(
std::chrono::high_resolution_clock::now()) {}
32 inline void start() noexcept { start_ = std::chrono::high_resolution_clock::now(); }
35 inline double stop() noexcept {
36 auto end = std::chrono::high_resolution_clock::now();
37 return std::chrono::duration<double, std::milli>(end - start_).count();
41 std::chrono::time_point<std::chrono::high_resolution_clock> start_;
Namespace of the serialbox library.
void start() noexcept
Reset the timer to the current time.
double stop() noexcept
Return the number of milliseconds elapsed since the timer was last reset.