Hacker News new | ask | show | jobs
by taf2 3055 days ago
This is a really bad idea. CPU burning while you wait. A better approach is setTimeout or requestAnimationFrame.
1 comments

Why @taf2 ? setTimeout is asynchronous, code after it will be executed before the function...requestAnimationFrame is for animations.