diff --git a/src/common/impl/time.c b/src/common/impl/time.c index 2927f9784..a991cb560 100644 --- a/src/common/impl/time.c +++ b/src/common/impl/time.c @@ -89,7 +89,7 @@ FFTimeGetAgeResult ffTimeGetAge(uint64_t birthMs, uint64_t nowMs) static void ffTimeInitQpcMultiplier(void) { LARGE_INTEGER frequency; - QueryPerformanceFrequency(&frequency); + RtlQueryPerformanceFrequency(&frequency); ffQpcMultiplier = 1000. / (double) frequency.QuadPart; } #endif diff --git a/src/common/time.h b/src/common/time.h index 998c8f58a..0156a9c72 100644 --- a/src/common/time.h +++ b/src/common/time.h @@ -18,7 +18,7 @@ static inline double ffTimeGetTick(void) //In msec #ifdef _WIN32 extern double ffQpcMultiplier; LARGE_INTEGER start; - QueryPerformanceCounter(&start); + RtlQueryPerformanceCounter(&start); return (double) start.QuadPart * ffQpcMultiplier; #elif defined(__HAIKU__) return (double) system_time() / 1000.; diff --git a/src/common/windows/nt.h b/src/common/windows/nt.h index ac586f0b4..2b1f0543d 100644 --- a/src/common/windows/nt.h +++ b/src/common/windows/nt.h @@ -1363,3 +1363,11 @@ NTSYSAPI NTSTATUS NTAPI NtUnmapViewOfSection( _In_ HANDLE ProcessHandle, _In_opt_ PVOID BaseAddress ); + +NTSYSAPI LOGICAL NTAPI RtlQueryPerformanceCounter( + _Out_ PLARGE_INTEGER PerformanceCounter +); + +NTSYSAPI LOGICAL NTAPI RtlQueryPerformanceFrequency( + _Out_ PLARGE_INTEGER PerformanceFrequency +);