• 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: Accuracy of timers?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accuracy of timers?


  • Subject: Re: Accuracy of timers?
  • From: "Jeremy W. Sherman" <email@hidden>
  • Date: Thu, 23 Apr 2009 00:49:11 -0400

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.

—Jeremy

On Thu, Apr 23, 2009 at 12:31 AM, M Pulis <email@hidden> wrote:

> Expect the same here. I believe they are not guaranteed for accuracy...
> from Apple:
>
> "Because of the various input sources a typical run loop manages, the
> effective resolution of the time interval for a timer is limited to on the
> order of 50-100 milliseconds."
>
> Reference google for NSTimer class reference.
>
> gary
>
>
>
>
> On Apr 22, 2009, at 9:19 PM, Eric E. Dolecki wrote:
>
>  I'm wondering generally how accurate timers can be expected to be. Are
>> they
>> generally accurate within a few ms depending on what else is going on in
>> an
>> application? Is threading an answer to most accurate timing? Just curious
>> here. I'm coming from another language where timers can be off fairly
>> significantly depending on drawing activity.
>> Eric
>> _______________________________________________
>>
>> 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
>>
>
> _______________________________________________
>
> 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
>
_______________________________________________

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

  • Follow-Ups:
    • Re: Accuracy of timers?
      • From: Alastair Houghton <email@hidden>
References: 
 >Accuracy of timers? (From: "Eric E. Dolecki" <email@hidden>)
 >Re: Accuracy of timers? (From: M Pulis <email@hidden>)

  • Prev by Date: Re: Accuracy of timers?
  • Next by Date: Re: Long Time Dealy When getting Vended Object
  • Previous by thread: Re: Accuracy of timers?
  • Next by thread: Re: Accuracy of timers?
  • Index(es):
    • Date
    • Thread