Timer Interval Issue

So when we try and use the timer to fire at 1 millisecond intervals and display it in a label (think live action clock) we’ve found that the millisecond timer is WAY off. To test this I set two timers, one set to fire at 1 millisecond and the other to fire at 1 second (both on loops) with the seconds timer to turn off the mills timer and display the intervals changed. I tried several different methods (updating a variable, updating a label, ect) and found that the millisecond timer fired 118-120 times to the 1 second timer when used on my phone in the Live App and 250 times to 1 seconds in the web preview. Am I missing something or is there a bud to this?

-Sam

1 Like

I was able to work around this by multiplying by 4 for every 250 times the timer fired. It is not perfect but works. Still wondering if there is a bug or not.

-Sam

1 Like

Hi there,

What I have found is that if you set your interval to 10ms, and increase your count by 10 every time this timer fires, you’ll get to 1000 in 1s. Smaller intervals don’t seem to update quickly enough to get to 1000ms in 1s.

The 10ms interval would probably suit most applications. This is 1/100 of a second, and is the interval used in most stopwatches.

3 Likes

Hi there,

Just following up after some relevant discussion in Basic timer question :

If you set your Timer interval to 1000ms, and set Loops to true, you can use the Timer block Time in milliseconds to return the remaining time in milliseconds from this timer.

If Count Up is false, you will get the remaining time from the Timer’s interval in milliseconds.

If Count Up is true, you will get the elapsed time from the Timer’s interval in milliseconds.

You can see a project that demonstrates this behavior here.

2 Likes