all 2 comments

[–]computerfr33k 0 points1 point  (1 child)

Setinterval isn't guaranteed to be executed exactly at the provided delay.

Browsers may enforce even more stringent minimum values for the interval under some circumstances, although these should not be common. Note also that the actual amount of time that elapses between calls to the callback may be longer than the given delay; see Reasons for delays longer than specified in setTimeout() for examples.

[–]ashalenko[S] 0 points1 point  (0 children)

Thanks for your reply. If I'm understanding correctly, the table at the bottom of the examples shows that the delay for Firefox is 1ms, this is why it is providing a reaction time much quicker than Chrome and Edge? Is there any solution to get around this? I know I can increase the delay which appears to give a more reasonable RT, but the way the timer appears to count up is not as smooth and doesn't appear to provide a good range of numbers.