The setInterval
call will place your function in the callback queue for a timer but it's not guaranteed to hit the interval that you specify with great precision. Each JS engine implementation varies in how it implements the timers but most will probably have some sort of pooling of timer callbacks which means that it's hard to predict the exact variation between the desired interval and the actual interval between calls to your callback function.
And the resolution gets worse when you get down to the tens of milliseconds level.
If you're looking for a way to get constant frame rate for animation you may want to take a look at this post that discusses using the requestAnimationFrame API available in modern borwsers.