Re: Observing Time
Re: Observing Time
- Subject: Re: Observing Time
- From: Scott Ribe <email@hidden>
- Date: Sat, 27 Jul 2013 17:57:42 -0600
On Jul 27, 2013, at 5:53 PM, email@hidden wrote:
> I just tried both approaches and guess which one stays right there with the menu bar clock and which one lags?
> dispatch timer is the winner.
> And it's not doing a lot.
I think you must be doing something wrong. NSTimer should not be lagging. Post code if you want, otherwise I'm done here.
> As per the docs, NSTimer gives millisecond accuracy, but can fire some undetermined time after the set fire interval.
Usually a fraction of a millisecond, never more than 100ms in my testing, and more than 10ms is rare.
And again, as has been pointed out to you REPEATEDLY, if the firing of NSTimer is lagging because your main thread is busy doing something else, you're not going to be able to update your UI anyway.
--
Scott Ribe
email@hidden
http://www.elevated-dev.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