Re: NSTimer question: How to fire at second 00, 05, 10 etc ?
Re: NSTimer question: How to fire at second 00, 05, 10 etc ?
- Subject: Re: NSTimer question: How to fire at second 00, 05, 10 etc ?
- From: Alastair Houghton <email@hidden>
- Date: Wed, 25 Oct 2006 19:47:01 +0100
On Oct 25, 2006, at 7:35 PM, Shawn Erickson wrote:
On 10/25/06, Gilles Celli <email@hidden> wrote:
And has anyone any idea about the accuracy (in milliseconds) of
NSTimer ?
In general you are looking at millisecond accuracy to 10s of
millisecond accuracy but that can be affected by countless factors
including how much work you are doing in your own application that may
hold off the servicing of a timer when it fires.
Are there any alternatives ?
What kind of accuracy are you looking for?
Perhaps a better question is, what are you trying to do? There are
various different reasons why you might want a periodic timer of this
type, and some of them have additional requirements (e.g. latency,
whether events *must* happen or whether they can be merged). Also,
for some uses of a periodic timer you can do a bit of the work up
front to give yourself a latency buffer (this is the kind of thing
you'd do for audio or video, for instance).
For some tasks, you don't actually need great accuracy, since you can
still use a measure of real time to calculate e.g. where an animation
should be.
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden