Skip to content

Commit

Permalink
Don't cap at ms.
Browse files Browse the repository at this point in the history
  • Loading branch information
alecthomas committed Nov 29, 2013
1 parent d657954 commit 49df16c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions entityx/help/Timer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 49df16c

Please sign in to comment.