Mercurial > mplayer.hg
changeset 26550:8a26190978a6
Force to uint64_t first to avoid direct conversion from double to unsigned int.
author | ulion |
---|---|
date | Mon, 28 Apr 2008 15:57:31 +0000 |
parents | 3cce5bfc52c0 |
children | fe2f16a7b128 |
files | osdep/timer-darwin.c |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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 */