On Tue, Mar 10, 2009 at 9:49 PM, Roland King <r...@rols.org> wrote: > Could you expand on that a bit please? My mental picture of the runloop has > always been more like a select() which does nothing unless there is > something to do. Not that I ever quite sorted out in my own mind how an > NSTimer fits is something you can select() on. Does the runloop actually > poll a whole lot even when it has nothing to do?
While NSTimers are not normal input sources, the frameworks are free to add any input source to the runloop that they wish. And in order for your timer to fire, you need to keep the runloop awake, using at least a dummy input source. See "Timers" in "Timer Programming Topics for Cocoa": "A timer is not a real-time mechanism; it fires only when one of the run loop modes to which the timer has been added is running and able to check if the timer’s firing time has passed." http://developer.apple.com/documentation/Cocoa/Conceptual/Timers/Articles/timerConcepts.html#//apple_ref/doc/uid/20000806 So your process will need to remain awake, which means that the processor needs to be that much more active. --Kyle Sluder _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com