diff options
author | Alec Thomas <alec@swapoff.org> | 2013-11-29 12:59:02 -0500 |
---|---|---|
committer | Alec Thomas <alec@swapoff.org> | 2013-11-29 12:59:02 -0500 |
commit | 49df16c349c2ac756d203015bb8f3edf3b342a88 (patch) | |
tree | 0a5243a459fe40b785f5c09a6214ee146d098840 | |
parent | d6579543c099c974b9557249aee72306c5aea99d (diff) |
Don't cap at ms.
-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 |