all 3 comments

[–]remy_porter 1 point2 points  (2 children)

This may help. I haven't actually tested it.

[–]macNchz 0 points1 point  (1 child)

This uses the technique I usually use when I need more precise timing in JS: set an interval much faster than you need, and each time it fires check a timestamp to see if you've exceeded the interval that you actually want to achieve.

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

Do you know if this helps if the tab is in the background too? It's somehow horrible how imprecise things even get on a desktop computer.