WKInterfaceTimer does not accurately countdown to a given date

Originator:christian.noon
Number:rdar://19932312 Date Originated:23-Feb-2015 06:04 PM
Status:Duplicate of 19867136 Resolved:29-May-2015 03:58 PM
Product:Developer Tools Product Version:Xcode 6.2 Beta 5
Classification:Serious Bug Reproducible:Always
 
Summary:
The WKInterfaceTimer.setDate method is supposed to countdown precisely to a given date. However, in my testing, it can be off anywhere from 50ms to 950ms. I have created a sample app to demonstrate the inaccuracy. My sample app demonstrates several issues.

* Setting the date with a time offset from now is not accurate (should show 0:10, instead shows 0:09)
* Counting down to a given date is randomly inaccurate. The "everySecondTimer" should log a message perfectly in sync with the timer second changes (this is almost always off anywhere between 50ms to 950ms)
* The countdownTimer should fire and log a message at the same time the interface timer hits 0:00. As you can see from the given sample app, they never occur at exactly the same time.

Unfortunately, I cannot get a callback from a WKInterfaceTimer when it hits zero, so the only way to demonstrate that they are off is to visually compare the time inaccuracy between the log statements and the interface timer display.

The reason I ran into this problem is that I'm trying to keep things perfectly in sync with the parent iOS application. This is impossible with the current implementation. I could achieve far better accuracy with a WKInterfaceDate, but I know that is a bad approach for several reasons.

Steps to Reproduce:
Ran the sample app.

Expected Results:
The log statements and the timer updates are perfectly in sync.

Actual Results:
The log statements and the timer updates are out-of-sync anywhere from 50ms to 950ms.

Version:
Xcode 6.2 Beta 5

Notes:


Configuration:


Attachments:
'WatchTimers.zip' was successfully uploaded.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!