• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTimer question: How to fire at second 00, 05, 10 etc ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >NSTableView with NSArray and C-array question (From: Gilles Celli <email@hidden>)
 >Re: NSTableView with NSArray and C-array question (From: Gilles Celli <email@hidden>)
 >Re: NSTableView with NSArray and C-array question (From: Glenn Zelniker <email@hidden>)
 >Re: NSTableView with NSArray and C-array question (From: Gilles Celli <email@hidden>)
 >Re: NSTableView with NSArray and C-array question (From: Glenn Zelniker <email@hidden>)
 >Re: NSTableView with NSArray and C-array question (From: Gilles Celli <email@hidden>)
 >Re: NSTableView with NSArray and C-array question (From: Glenn Zelniker <email@hidden>)
 >Re: NSTableView with NSArray and C-array question (From: Gilles Celli <email@hidden>)
 >Re: NSTableView with NSArray and C-array question (From: "R. Matthew Emerson" <email@hidden>)
 >NSTimer question: How to fire at second 00, 05, 10 etc ? (From: Gilles Celli <email@hidden>)
 >Re: NSTimer question: How to fire at second 00, 05, 10 etc ? (From: "Shawn Erickson" <email@hidden>)

  • Prev by Date: Re: NSTask stealth bug in readDataOfLength!! :(
  • Next by Date: views and mouse events troubles
  • Previous by thread: Re: NSTimer question: How to fire at second 00, 05, 10 etc ?
  • Next by thread: Re: NSTimer question: How to fire at second 00, 05, 10 etc ?
  • Index(es):
    • Date
    • Thread