3 ms·
I see. You are downvoting me because you think RAF is only useful for drawing graphics in the active tab, and nothing else. setTimeout is absolutely more relia
by beebeepka 5y ago
I see. You are downvoting me because you think RAF is only useful for drawing graphics in the active tab, and nothing else.
setTimeout is absolutely more reliable than setInterval. Maybe try writing a scheduler/task runner and try for yourself before coming down on people.
- fenomas 5y ago(a) I didn't downvote you. (b) setInterval and setTimeout fire off the same event loop; they can only occur at the same fixed times. Why do you think one is more reliable? Just repeating that it's the case doesn't convey any information. (c) I've written various schedulers; the most recent one is `micro-game-shell` on github if you're interested.
- beebeepka 5y agob) I've observed different time deltas between the two on embedded and standard PC hardware. That's why I think there's a difference. Also, their behaviour has changed over the last few years, making them extremely unreliable as the user changes tabs