+ 6
Time interval period?
What is the minimum amount of time interval for js? I test it and was about 5 ms. when i set it to 1ms. Is it depending on device?
3 Respostas
+ 8
The min timeout time is 4ms according to:
https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout#Minimum_delay_and_timeout_nesting
Likely the same for intervals. I could be wrong though, might be 1 ms.
+ 6
For better timeout acuracy interval, you should look at the new 'requestAnimationFrame()' method, wich is designed for be called every delay instead of wait for the delay before next call ^^
https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame
+ 4
Is there any solution to get a precise 1 ms?