Open michaelkirk opened 9 years ago
Reproduced!
@michaelkirk
I am not sure what the priority of this is.
NSTimer is not meant to be super accurate.
You could try replacing the NSTimer with dispatch_source_create and dispatch_source_set_event_handler - Official Docs.
I would also replace NSDate with CFAbsoluteTimeGetCurrent().
@michaelkirk
Does this also happen on physical devices? I can't build for devices without credentials.
Looking at this a little more, the delay might be caused by the clear background of the UILabel - view cannot be drawn fast enough.
I tried the CFAbsoluteTimeGetCurrent() and dispatch_source_set_event_handler.
It did not really make a difference. Although the CFAbsolutTimeGetCurrent seems to work a little better with NSTimer.
Given I've guess the new spot Then I see the countdown timer But sometimes it will say (e.g.) 23:02 for 2 seconds And then hop to (e.g.) 23:00.
So, the actual time keeping is correct, but the display is not reliably updated.