Why is setInterval method very unstable?
What do you mean by "very unstable"? The setInterval() method is not "unstable", but due to JS property of running in a single process ( in blocking mode: while sub-scripts runs, other will waits ), you cannot use it as a clock, meaning doesn't expect that this could be regularly and accuratly called ^^
The time between isn't accurate because of what I previously explain...
While studying/practicing JS timers, I cross again one solution which may interest you: https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame ( 'requestAnimationFrame' method of 'window' object... )
I mean the time between