[MPlayer-dev-eng] [PATCH] Precise timer for Darwin

Dan Christiansen danchr at daimi.au.dk
Sat May 17 16:30:03 CEST 2003


Attached below is a replacement for timer-macosx.c that uses precise 
kernel-space timing. The timer routines themselves report to be 
accurate by 20-30us (mostly a bit late) when not preempted. (If the 
task is preempted, they can be up to 20-30ms or more late.) I'd 
consider it accurate enough ;)

These timers don't use any Mac OS X specific API, so they should also 
work on a raw Darwin install. I suggest that timer-macosx.c is renamed 
to timer-darwin.c and that the attached patch is applied to 
osdep/Makefile is applied to reflect this.

Please note that unlike the accurate Linux timers, there is no need for 
tweaking or super user privileges :)

- Dan Christiansen

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: timer-darwin.c
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20030517/50d12286/attachment.txt>
-------------- next part --------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: timer-darwin.diff
Type: application/octet-stream
Size: 502 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20030517/50d12286/attachment.obj>

More information about the MPlayer-dev-eng mailing list