# HG changeset patch # User ulion # Date 1209398251 0 # Node ID 8a26190978a6043b3443574417bfa349a9bb3481 # Parent 3cce5bfc52c0419d25a2cc5d7ba9d9ba18d735a8 Force to uint64_t first to avoid direct conversion from double to unsigned int. diff -r 3cce5bfc52c0 -r 8a26190978a6 osdep/timer-darwin.c --- a/osdep/timer-darwin.c Mon Apr 28 15:42:36 2008 +0000 +++ b/osdep/timer-darwin.c Mon Apr 28 15:57:31 2008 +0000 @@ -54,15 +54,13 @@ /* current time in microseconds */ unsigned int GetTimer() { - return (unsigned int)((mach_absolute_time() * timebase_ratio - startup_time) - * 1e6); + return (unsigned int)(uint64_t)((mach_absolute_time() * timebase_ratio - startup_time) * 1e6); } /* current time in milliseconds */ unsigned int GetTimerMS() { - return (unsigned int)((mach_absolute_time() * timebase_ratio - startup_time) - * 1e3); + return (unsigned int)(uint64_t)((mach_absolute_time() * timebase_ratio - startup_time) * 1e3); } /* time spent between now and last call in seconds */