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

Dan Christiansen danchr at daimi.au.dk
Wed May 21 21:49:00 CEST 2003


This patch seems to have slipped through. I have used it since I posted 
it; it's seems stable in it's accuracy.

- Dan

On Saturday, May 17, 2003, at 04:30 PM, Dan Christiansen wrote:

> Hi,
>
> 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/20030521/e951f9cb/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/20030521/e951f9cb/attachment.obj>
-------------- next part --------------
>


More information about the MPlayer-dev-eng mailing list