Re: Accuracy of timers?
Re: Accuracy of timers?
- Subject: Re: Accuracy of timers?
- From: Alastair Houghton <email@hidden>
- Date: Thu, 23 Apr 2009 10:29:38 +0100
On 23 Apr 2009, at 05:49, Jeremy W. Sherman wrote:
Timers can only fire when your app is running in the run loop mode
that they
are part of. You can investigate alarm(3) and setitimer(3), but I
don't know
how much more accurate they will be. Mac OS X is not a real-time OS.
I'm not sure I'd ever expect alarm() or setitimer() to give accurate
timing, even on a bona fide real-time OS.
I think there are some features of OS X designed to help with soft
real-time tasks though; Core Audio can probably do more accurate
timing if that's what someone wants to do, and you might also be able
to use Mach APIs to do something similar (though as is often noted
they're discouraged).
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden