Re: NSTimers gone wild...
Re: NSTimers gone wild...
- Subject: Re: NSTimers gone wild...
- From: Chris Kane <email@hidden>
- Date: Sun, 31 Aug 2003 12:52:03 -0700
The NSTimer will start to skip firing dates, picking the next one after
the callback method returns to it. So you'll get less than 20 firings
per second.
There is no way to adjust the priority of the timer relative to other
input sources. The kernel for the most part determines which of many
available inputs it gives to the app. The kernel tends to round-robin
amongst the ready input sources. A timer firing at 1/20th of a second
shouldn't starve out other sources in any case, assuming your method
takes about that long or less. If your method can sometimes take 5
seconds, well, that can be a different matter (and you probably
shouldn't try to fire it 20 times a second, but put it off on another
thread or something).
Chris Kane
Cocoa Frameworks, Apple
On Aug 4, 2003, at 10:40 AM, John Pattenden wrote:
I have an NSTimer I call every 20th of a second, if it takes more than
a 20th of a second to do its work will the runloop start to drop other
events?
My App starts to ignore logout events if my timer fires too often - is
there a way to drop its priority but still keep it firing at about the
same rate if there are no other events pending?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.