Commit 8e9916ce authored by deuce's avatar deuce
Browse files

Set the value to the fractional part first, then add the integral part.

This *should* result in the highest possible resolution.
parent 4c700a32
......@@ -515,8 +515,8 @@ long double DLLCALL xp_timer(void)
ret /= ((long double)freq.HighPart*4294967296)+((long double)freq.LowPart);
#else
/* In MSVC, a long double does NOT have 19 decimals of precision */
ret=((long long int)(tick.QuadPart/freq.QuadPart))
+(((long double)(tick.QuadPart%freq.QuadPart))/freq.QuadPart);
ret=(((long double)(tick.QuadPart%freq.QuadPart))/freq.QuadPart);
ret+=((long long int)(tick.QuadPart/freq.QuadPart))
#endif
}
else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment