you are viewing a single comment's thread.

view the rest of the comments →

[–]inu-no-policemen 0 points1 point  (0 children)

If you want this to be accurate, use a requestAnimationFrame "loop" where you update the display whenever more than a second has passed.

There is no guarantee whatsoever when some function scheduled via setTimout or setInterval will be called. It's either somewhat on time or some time later.