diff options
-rw-r--r-- | entityx/help/Timer.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/entityx/help/Timer.cc b/entityx/help/Timer.cc index 5f70ee0..43960a7 100644 --- a/entityx/help/Timer.cc +++ b/entityx/help/Timer.cc @@ -25,8 +25,7 @@ void Timer::restart() { } double Timer::elapsed() { - auto duration = std::chrono::system_clock::now() - _start; - return static_cast<double>(std::chrono::duration_cast<std::chrono::milliseconds>(duration).count()) / 1000.0; + return std::chrono::duration<double>(std::chrono::system_clock::now() - _start).count(); } } // namespace help |