Sleep.js: JavaScript port of PHP sleep() function in 6 LOC (github.com) 2 points by Horlahcoded 8y ago ↗ HN
[–] taf2 8y ago ↗ This is a really bad idea. CPU burning while you wait. A better approach is setTimeout or requestAnimationFrame. [–] Horlahcoded 8y ago ↗ Why @taf2 ? setTimeout is asynchronous, code after it will be executed before the function...requestAnimationFrame is for animations.
[–] Horlahcoded 8y ago ↗ Why @taf2 ? setTimeout is asynchronous, code after it will be executed before the function...requestAnimationFrame is for animations.
3 comments
[ 3.0 ms ] story [ 19.4 ms ] thread