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

Use the QuadPart member of the LARGE_INTEGER union.

parent 37c82f6b
No related branches found
No related tags found
No related merge requests found
...@@ -480,8 +480,12 @@ long double DLLCALL xp_timer(void) ...@@ -480,8 +480,12 @@ long double DLLCALL xp_timer(void)
LARGE_INTEGER freq; LARGE_INTEGER freq;
LARGE_INTEGER tick; LARGE_INTEGER tick;
if(QueryPerformanceFrequency(&freq) && QueryPerformanceCounter(&tick)) { if(QueryPerformanceFrequency(&freq) && QueryPerformanceCounter(&tick)) {
#if 0
ret=((long double)tick.HighPart*4294967296)+((long double)tick.LowPart); ret=((long double)tick.HighPart*4294967296)+((long double)tick.LowPart);
ret /= ((long double)freq.HighPart*4294967296)+((long double)freq.LowPart); ret /= ((long double)freq.HighPart*4294967296)+((long double)freq.LowPart);
#else
ret=((long double)tick.QuadPart)/freq.QuadPart;
#endif
} }
else { else {
ret=GetTickCount(); ret=GetTickCount();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment