From b48947fc65e6f111b8a1db10ac7747b95b7e9850 Mon Sep 17 00:00:00 2001 From: nplourde Date: Wed, 27 Oct 2004 18:03:11 +0000 Subject: repace call to sleep_accurate to usleep which fix hang while using -cache option on osx git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13777 b3059339-0415-0410-9bf9-f77b7e298cf2 --- osdep/timer-darwin.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'osdep') diff --git a/osdep/timer-darwin.c b/osdep/timer-darwin.c index eba0bc2891..1a9a6e9673 100644 --- a/osdep/timer-darwin.c +++ b/osdep/timer-darwin.c @@ -32,20 +32,12 @@ static double timebase_ratio; 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); } -- cgit v1.2.3