X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fplatform%2Futil%2Ftimeutils.h;h=5f2d27aeec3f46914e0a5b3388df50a2278f28df;hb=e14b15876a6d4b601973d01905eb2a6a0daeedcb;hp=f4f28109288074b3436001e810c8ebc0ed7bff25;hpb=fd49327a9ece647f88de7c452ec8c8ad5c1a1c1e;p=deb_libcec.git diff --git a/src/lib/platform/util/timeutils.h b/src/lib/platform/util/timeutils.h index f4f2810..5f2d27a 100644 --- a/src/lib/platform/util/timeutils.h +++ b/src/lib/platform/util/timeutils.h @@ -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