Skip to content
Snippets Groups Projects
Commit f80a9701 authored by deuce's avatar deuce
Browse files

Fix Win32 LARGE_INTEGER useage.

parent 64d5103c
No related branches found
No related tags found
No related merge requests found
......@@ -478,9 +478,10 @@ double DLLCALL xp_timer(void)
#else
#ifdef _WIN32
LARGE_INTEGER freq;
if(QueryPerformanceFrequency(&freq)) {
ret=QueryPerformanceCounter();
ret /= freq;
LARGE_INTEGER tick;
if(QueryPerformanceFrequency(&freq) && QueryPerformanceCounter(&tick)) {
ret=((double)tick.HighPart*4294967296)+((double)tick.LowPart);
ret /= ((double)freq.HighPart*4294967296)+((double)freq.LowPart);
}
else {
ret=GetTickCount();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment