[MPlayer-cvslog] r26582 - trunk/osdep/timer-darwin.c

ulion subversion at mplayerhq.hu
Mon Apr 28 17:57:31 CEST 2008


Author: ulion
Date: Mon Apr 28 17:57:31 2008
New Revision: 26582

Log:
Force to uint64_t first to avoid direct convertion from double to unsigned int.


Modified:
   trunk/osdep/timer-darwin.c

Modified: trunk/osdep/timer-darwin.c
==============================================================================
--- trunk/osdep/timer-darwin.c	(original)
+++ trunk/osdep/timer-darwin.c	Mon Apr 28 17:57:31 2008
@@ -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 */



More information about the MPlayer-cvslog mailing list