Commit f216f987 authored by David Tellenbach's avatar David Tellenbach Committed by Tobias Lasser

[Timer] Replace `std::system_clock` by `std::steady_clock`

Timing should always be done using `std::steady_clock` because it's the
only clocked that guarantees steady advancement of `std::time_point`.
parent 4fbfe5f5
Pipeline #200616 passed with stages
in 22 minutes and 49 seconds
......@@ -19,6 +19,6 @@ namespace elsa
// ------------------------------------------
// explicit template instantiation
template class Timer<std::chrono::milliseconds, std::chrono::system_clock>;
template class Timer<std::chrono::milliseconds, std::chrono::steady_clock>;
} // namespace elsa
......@@ -17,7 +17,7 @@ namespace elsa
* This class provides logging of timing using the guard pattern. It stores the current time
* upon creation, and outputs a log message with time elapsed on destruction.
template <class Duration = std::chrono::milliseconds, class Clock = std::chrono::system_clock>
template <class Duration = std::chrono::milliseconds, class Clock = std::chrono::steady_clock>
class Timer
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment