-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Time in seconds is off #43
Comments
I played around with the example file in Tock and it looks like it does not support 1 second (1000ms) ticks, because of rounding it won't be accurate, and you have to use a smaller tick like 250ms for it to work correctly. |
Thanks for raising the issue. I'll try to find some time to look into it. It seems strange that it would have problems with 1s ticks as it's all measured in ms... Is it only 1000ms exactly that causes the issue, or times over a certain amount? |
I only tested 1000ms as that is what I needed. You can see it happening in
the example provided with tock, just change the interval to 1000 and watch
the console log you can see it skips 59 for me usually or 58. It looks like
a rounding issue as the output number is generally really close to 1000
…On Tue, Jun 5, 2018, 05:06 Jake, ***@***.***> wrote:
Thanks for raising the issue. I'll try to find some time to look into it.
It seems strange that it would have problems with 1s ticks as it's all
measured in ms... Is it only 1000ms exactly that causes the issue, or times
over a certain amount?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#43 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AJc6ECX3U1e75KmR04jPyWnVdvAwj2Jfks5t5kn5gaJpZM4UYUn->
.
|
Looking at the count up example, it skipped Log:
|
Starting a timer and noticing the time in seconds skips sometimes. Like in a 25 min timer
[25:58, 25:57] and 25:59 is missing. Also have had 25:58 missing and 25:59 showing.
Sometime will repeat the same number in general overtime
`function displayTime(timer) {
const currentTime = timer.msToTimecode(timer.lap());
// console.log(timer.msToTimecode(timer.lap()));
const timeMMSS = currentTime.substring(3, 8);
console.log(currentTime);
}
function getTimer() {
const timer = new Tock({
countdown: true,
interval: 1000,
callback: displayTime
// complete: someCompleteFunction
});
return timer;
}`
The text was updated successfully, but these errors were encountered: