Open rzimmerman opened 11 years ago
I've heard people recommend against setInterval
(see the section about stacking calls at JavaScript Garden. Perhaps you could emulate it with setTimeout
.
Thanks for the link on setInterval
. That makes a lot of sense - we wouldn't want calls to the timer function to queue up while blocked. Something more like NSTimer
where more than one call gets dropped would be better. Or just do what the article says and keep calling setTimeout
in some intelligent way.
It would be cool if
setInterval
worked kind of like awhile
loop with a conditional.setTimeout
could be something likedelay for