Re: NSTimers and sleeping mac's
Re: NSTimers and sleeping mac's
- Subject: Re: NSTimers and sleeping mac's
- From: "Sean McBride" <email@hidden>
- Date: Fri, 27 Jul 2007 12:03:19 -0400
- Organization: Rogue Research
On 2007-07-27 07:46, Aaron Wallis said:
>I have an application that uses NSTimers to schedule frequent actions
>on behalf of the user. its not something that you would put into a
>cron, cause the timers are reset when the users take actions etc etc
>etc.
>
>However, I've been having some issues lately with writing a new
>version of the application. when I put my mac to sleep, and then wake
>it up, the NStimers aren't firing.
>Does anyone know how to get the application to detect that the
>computer has awoken, and run a method or something like that?
Also, despite what its name might lead you to believe, NSTimer's
setFireDate: ("Resets the receiver to fire next at a given date")
doesn't really to that. It would be better described as "takes the
given date/time, subtracts the current date/item, and resets the
receiver to fire that many seconds from now". So if you care about
automatic DST changes, and manual changes to the clock, you'll also want
to register for notification of the clock changing.
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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