summaryrefslogtreecommitdiffstats
path: root/osdep/timer-darwin.c
diff options
context:
space:
mode:
Diffstat (limited to 'osdep/timer-darwin.c')
-rw-r--r--osdep/timer-darwin.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/osdep/timer-darwin.c b/osdep/timer-darwin.c
index 68029d1fdc..b8fe380e0c 100644
--- a/osdep/timer-darwin.c
+++ b/osdep/timer-darwin.c
@@ -54,15 +54,13 @@ int usec_sleep(int usec_delay)
/* 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 */