NSTimer after Sleep
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