Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
telcy
· 8y ago · 0 comments
What you mean is setInterval and does work well for synchronous execution. His approach is correct and would even work if the animate function is asynchronous as the next tick gets scheduled at the end of animate function execution.
Comments
[–]
Qwertie
8y ago
Ah yes, you are right. Got those mixed up.
[–]
derrikcurran
8y ago
Recursive setTimeout is a great way to allow for easy timing/speed changes on the fly.
[–]
telcy
OP
8y ago
good point :)