• 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 after Sleep
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTimer after Sleep


  • Subject: NSTimer after Sleep
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Fri, 29 Apr 2016 16:23:44 +0700

OS X 10.11.4; Xcode Version 7.3 (7D175).

self.timer = [ NSTimer scheduledTimerWithTimeInterval: 900 … repeats: YES ];
self.timer.fireDate = [ NSDate dateWithTimeIntervalSinceNow: 2222 ];

works fine without sleep.

But:
fireDate: Fri 29 Apr 2016 15:06:14 +0700 in 37.03 min +900 sec

Fri 29 Apr 2016 14:38:39 +0700 Wake.
fireDate: Fri 29 Apr 2016 15:06:14 +0700 in 27.57 min +900 sec

Fri 29 Apr 2016 14:55:10 +0700 Wake.
fireDate: Fri 29 Apr 2016 15:06:14 +0700 in 11.05 min +900 sec

Fri 29 Apr 2016 15:08:35 +0700 Wake.
fireDate: Fri 29 Apr 2016 15:06:14 +0700 LATE 141.8 sec +900 sec

Fri 29 Apr 2016 15:26:31 +0700 Check.
fireDate: Fri 29 Apr 2016 15:06:14 +0700 LATE 1217.8 sec +900 sec

I would expect the timer to fire rather soon now, but it never does.
The timer is not nil, is not invalid and has the correct fire time.

What am I doing wrong?

Gerriet.



_______________________________________________

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


  • Follow-Ups:
    • Re: NSTimer after Sleep
      • From: Alex Kac <email@hidden>
  • Prev by Date: Re: Custom-vs-modal presentation?
  • Next by Date: Re: NSTimer after Sleep
  • Previous by thread: Attempting to load the view of a view controller while it is deallocating is not allowed and may result in undefined behavior
  • Next by thread: Re: NSTimer after Sleep
  • Index(es):
    • Date
    • Thread