cec: fixed - frequency wasn't checked in GetTimeMs(), leading to incorrect wait times...
[deb_libcec.git] / src / lib / platform / util / timeutils.h
index f4f28109288074b3436001e810c8ebc0ed7bff25..5f2d27aeec3f46914e0a5b3388df50a2278f28df 100644 (file)
@@ -80,15 +80,12 @@ namespace PLATFORM
   #if defined(__APPLE__)
     return (int64_t) (CVGetCurrentHostTime() / (int64_t)(CVGetHostClockFrequency() * 0.001));
   #elif defined(__WINDOWS__)
-    time_t rawtime;
-    time(&rawtime);
-
     LARGE_INTEGER tickPerSecond;
     LARGE_INTEGER tick;
     if (QueryPerformanceFrequency(&tickPerSecond))
     {
       QueryPerformanceCounter(&tick);
-      return (int64_t) (tick.QuadPart / 1000.);
+      return (int64_t) (tick.QuadPart / (tickPerSecond.QuadPart / 1000.));
     }
     return -1;
   #else