Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
taf2
· 8y ago · 0 comments
This is a really bad idea. CPU burning while you wait. A better approach is setTimeout or requestAnimationFrame.
Comments
[–]
devhammed
8y ago
Why @taf2 ? setTimeout is asynchronous, code after it will be executed before the function...requestAnimationFrame is for animations.