summaryrefslogtreecommitdiffstats
path: root/osdep
diff options
context:
space:
mode:
authorulion <ulion@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-04-28 15:57:31 +0000
committerulion <ulion@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-04-28 15:57:31 +0000
commitd90a7e02837fb466b76b847a74183bd4eac3fe9f (patch)
tree523f16589ede4ec59c1406c5bf3743d08047a6cd /osdep
parentd4f42c4d4629ba19c1f308ebb72fb92680668504 (diff)
downloadmpv-d90a7e02837fb466b76b847a74183bd4eac3fe9f.tar.bz2
mpv-d90a7e02837fb466b76b847a74183bd4eac3fe9f.tar.xz
Force to uint64_t first to avoid direct conversion from double to unsigned int.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26582 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'osdep')
-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 */