• 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
Re: Power Nap causing NSTimer to fire immediately
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Power Nap causing NSTimer to fire immediately


  • Subject: Re: Power Nap causing NSTimer to fire immediately
  • From: Charlie Dickman <email@hidden>
  • Date: Sat, 04 Aug 2012 13:11:23 -0400

I am not at all sure about the details but I think your app is receiving some sort of notification that power sleep is occurring in order to allow it to do what it needs to do in that situation. My guess is that all timers are caused to expire because when asleep they will not and then, when wake up occurs, the app is hung waiting for events that will never happen.

I don't know how, perhaps someone else on this list can respond, but you should, when your timers fire prematurely, determine if power sleep is occurring and act accordingly.

On Aug 4, 2012, at 11:47 AM, Trygve Inda wrote:

>> When our software is running and the Mac goes into Power Nap, our NSTimers
>> (which are fire-once and set to 3 hour periods) are firing immediately, so
>> the software does the timer work and installed a new fire-once timer for 3
>> hours later.
>>
>> Except that one of course fires immediately and it just keeps going.
>>
>> How can we prevent this?
>>
>> I'd like our app to stop completely (but not quit of course) during Power
>> Nap.
>
> Just a follow-up. It seems our app shouldn't be able to do anything during
> power nap, but something is causing weirdness. Anyone see anything like this
> with NSTimers on 10.8?
>
> Trygve
>
>
>
> _______________________________________________
>
> 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

Charlie Dickman
email@hidden




_______________________________________________

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

References: 
 >Re: Power Nap causing NSTimer to fire immediately (From: Trygve Inda <email@hidden>)

  • Prev by Date: Re: crash in showOpenPanel on ML
  • Next by Date: 10.8 copiesOnScroll, -setNeedsDisplayInRect: ignored during scrolling
  • Previous by thread: Re: Power Nap causing NSTimer to fire immediately
  • Next by thread: 10.8 copiesOnScroll, -setNeedsDisplayInRect: ignored during scrolling
  • Index(es):
    • Date
    • Thread