os-x: don't add 0.5 before dividing in GetTimeMs()
authorLars Op den Kamp <lars@opdenkamp.eu>
Sun, 4 Mar 2012 09:45:18 +0000 (10:45 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Sun, 4 Mar 2012 09:45:18 +0000 (10:45 +0100)
src/lib/platform/util/timeutils.h

index 58cc89bc39db5f5aebd63aeafe352082c87a72e2..f4f28109288074b3436001e810c8ebc0ed7bff25 100644 (file)
@@ -78,7 +78,7 @@ namespace PLATFORM
   inline int64_t GetTimeMs()
   {
   #if defined(__APPLE__)
-    return (int64_t) (CVGetCurrentHostTime() / (int64_t)(CVGetHostClockFrequency() * 0.001 + 0.5));
+    return (int64_t) (CVGetCurrentHostTime() / (int64_t)(CVGetHostClockFrequency() * 0.001));
   #elif defined(__WINDOWS__)
     time_t rawtime;
     time(&rawtime);