changeset 13776:3029f9e4f2ac

repace call to sleep_accurate to usleep which fix hang while using -cache option on osx
author nplourde
date Wed, 27 Oct 2004 18:03:11 +0000
parents f4cbdc7d5c49
children 50b4c7da30b5
files osdep/timer-darwin.c
diffstat 1 files changed, 1 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/osdep/timer-darwin.c	Wed Oct 27 17:21:18 2004 +0000
+++ b/osdep/timer-darwin.c	Wed Oct 27 18:03:11 2004 +0000
@@ -32,20 +32,12 @@
 
 const char *timer_name = "Darwin accurate";
 
-/* the core sleep function, uses floats and is used in MPlayer G2 */
-float sleep_accurate(float time_frame)
-{
-  uint64_t deadline = time_frame / timebase_ratio + mach_absolute_time();
 
-  mach_wait_until(deadline);
-
-  return (mach_absolute_time() - deadline) * timebase_ratio;
-}
 
 /* wrapper for MPlayer G1 */
 int usec_sleep(int usec_delay)
 {
-  return sleep_accurate(usec_delay / 1e6) * 1e6;
+  return usleep(usec_delay);
 }