Commit 4e7f70dc authored by deuce's avatar deuce
Browse files

Make sure math is done as a long double (And long double is used for

the working variable)
parent 8bf12041
......@@ -467,7 +467,7 @@ int DLLCALL get_errno(void)
/****************************************************************************/
long double DLLCALL xp_timer(void)
{
double ret=0;
long double ret=0;
#ifdef __unix__
struct timeval tv;
if(gettimeofday(&tv,NULL)==1)
......@@ -480,8 +480,8 @@ long double DLLCALL xp_timer(void)
LARGE_INTEGER 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);
ret=((long double)tick.HighPart*4294967296)+((long double)tick.LowPart);
ret /= ((long double)freq.HighPart*4294967296)+((long double)freq.LowPart);
}
else {
ret=GetTickCount();
......
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