diff options
author | nplourde <nplourde@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-10-27 18:03:11 +0000 |
---|---|---|
committer | nplourde <nplourde@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-10-27 18:03:11 +0000 |
commit | b48947fc65e6f111b8a1db10ac7747b95b7e9850 (patch) | |
tree | 96ac6fa978e102bc5c232c0f5f88e278eea3ffac /osdep/timer-darwin.c | |
parent | 40fd57238ce577c565d30608ad22508a6deff7a3 (diff) | |
download | mpv-b48947fc65e6f111b8a1db10ac7747b95b7e9850.tar.bz2 mpv-b48947fc65e6f111b8a1db10ac7747b95b7e9850.tar.xz |
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
Diffstat (limited to 'osdep/timer-darwin.c')
-rw-r--r-- | osdep/timer-darwin.c | 10 |
1 files changed, 1 insertions, 9 deletions
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); } |