]> code.bitgloo.com Git - clyne/entityx.git/commitdiff
Don't cap at ms.
authorAlec Thomas <alec@swapoff.org>
Fri, 29 Nov 2013 17:59:02 +0000 (12:59 -0500)
committerAlec Thomas <alec@swapoff.org>
Fri, 29 Nov 2013 17:59:02 +0000 (12:59 -0500)
entityx/help/Timer.cc

index 5f70ee0b728783217f0e2c1b5ecb02357dc34fda..43960a79c22c705398c68f453babdd8b7e13625f 100644 (file)
@@ -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