setTimeout(function() { #1
/* Some long block of code... */ #1
setTimeout(arguments.callee, 10); #1
}, 10); #1
setInterval(function() { #2
/* Some long block of code... */ #2
}, 10); #2
#1 Sets up a timeout that reschedules itself
#2 Sets up an interval
The two pieces of code in listing 8.1 may appear to be functionally equivalent, but they
are not. Notably the setTimeout variant of the code will always have at least a 10ms delay
after the previous callback execution (it may end up being more, but never less), whereas
the setInterval will attempt to execute a callback every 10ms regardless of when the last
callback was executed.