Re: Accuracy of timers?
Re: Accuracy of timers?
- Subject: Re: Accuracy of timers?
- From: Scott Ribe <email@hidden>
- Date: Thu, 23 Apr 2009 07:07:57 -0600
- Thread-topic: Accuracy of timers?
> P.S. For completeness I should mention of course nanosleep, but I
> don't know of its precision and in any case it can be interrupted by
> signals, which makes it more difficult to use than you'd expect.
I use nanosleep in a non-main thread (when dealing with some twitchy USB
hardware that locks up if I send it commands too quickly), and I timed it
mostly out of curiosity. I found it to be shockingly accurate--sorry I don't
remember the numbers. Of course, I'm on an 8-core machine, and results may
well be very different on dual-core with a busy user...
--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 722-0567 voice
_______________________________________________
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