On Jul 26, 2013, at 8:13 AM, Steve Sisak <[email protected]> wrote:
> It's worth noting that's very energy inefficient. > > Once the WWDC sessions are back on line, watch > the energy efficiency sessions to see what's > happening with timers in Mavericks. Yes. The only place I've deployed constantly-firing timer code is on a server that runs 24/7, and in a particular full-screen mode that the user only enters for a short time. > For what the OP is doing, using NSTimer on the > main event loop with an offset would be a good > implementation -- it might take adjusting the > offset to get the timer to fire a little early > and/or accomodate the actual fire time in the > code. Personally, I'd probably just do a non-repeating timer, set to fire at the next second roll-over. Alloc'ing, scheduling and releasing 1 timer per second is not a lot of overhead. -- Scott Ribe [email protected] http://www.elevated-dev.com/ (303) 722-0567 voice _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
