-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Timer skips seconds #90
Comments
I noticed this too - I was poking around in the source to try to figure out why this was happening. Something related to |
When I was making the app more energy efficient, I made sure that the UI is only updated once per second. I think what may be happening is that in the unusual case where you happen to start the countdown very close to the seconds boundary, you could get an update at, say 8.99 seconds and then at 8.01 seconds, which would both show as "8". Note the Foundation repeating timers don't "drift" -- you don't get 8.99 then 7.95 then 6.91, then 5.86. It's just an issue of variance around the boundary where you might get 8.99 then 8.01 then 6.99 then 6.01. This implies the fix is to make sure the repeating timer starts safely away from a boundary -- to make sure you get updates at for example 9.09, 8.11, 7.08, 6.10, 5.09 (the variance doesn't affect the significant digit). |
Fix #94 looks good. |
Describe the bug
The timer skips seconds from time to time (pun intended). For example, it may go from 53 to 51 without seeing 52.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It shouldn't skip numbers.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: