• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSTimer and deep sleep
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: NSTimer and deep sleep
      • From: Chris Kane <email@hidden>
    • Re: NSTimer and deep sleep
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: Flame retardant
  • Next by Date: Authorization Trampoline?
  • Previous by thread: Re: Can't bring application frontmost
  • Next by thread: Re: NSTimer and deep sleep
  • Index(es):
    • Date
    • Thread