Do the multiplication/division with floating point numbers in time calculations on...
authorPaolo Molaro <lupus@oddwiz.org>
Thu, 8 Dec 2011 08:56:47 +0000 (09:56 +0100)
committerPaolo Molaro <lupus@oddwiz.org>
Thu, 8 Dec 2011 08:58:30 +0000 (09:58 +0100)
mono/utils/mono-time.c

index 5d926a930bb2fb8d454cefcdb930ba7c83462f7f..2bf306e49d241a9d76c9246dac63c85446c6799d 100644 (file)
@@ -38,7 +38,7 @@ mono_100ns_ticks (void)
        QueryPerformanceCounter (&value);
        cur_time = value.QuadPart;
        /* we use unsigned numbers and return the difference to avoid overflows */
-       return (cur_time - start_time) * MTICKS_PER_SEC / freq.QuadPart;
+       return (cur_time - start_time) * (double)MTICKS_PER_SEC / freq.QuadPart;
 }
 
 /*