NSTimer and deep sleep
NSTimer and deep sleep
- Subject: NSTimer and deep sleep
- From: Greg Anderson <email@hidden>
- Date: Thu, 23 May 2002 20:58:33 -0500
I've got an app I'm working on that runs as a background-only app
and runs a timer (it changes the desktop picture after a time interval).
My problem is that when a computer is put into deep sleep, the timer
stops timing (at least this is what I'm observing), and thus if it was
set to rotate "every day" and the computer was awake for 6 hours, asleep
for 18, it wouldn't actually change the picture for another 18 hours of
computer-awake time.
My question is: is there a "good" way to handle timer functionality
when the computer's asleep? My first thought was to keep track of when
the timer starts, and run yet another timer on say a once a minute loop
to check and see if the time interval specified has passed. But that
starts to seem a little kludgey. Unless we get an event on wake... but I
digress.
Any advice/ideas/experience/limericks would be appreciated. (Wait,
maybe not the limericks). Thanks.
Greg
_______________________________________________
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.