3 ms·
This is a really bad idea. CPU burning while you wait. A better approach is setTimeout or requestAnimationFrame.
by taf2 9y ago
This is a really bad idea. CPU burning while you wait. A better approach is setTimeout or requestAnimationFrame.
- Horlahcoded 9y agoWhy @taf2 ? setTimeout is asynchronous, code after it will be executed before the function...requestAnimationFrame is for animations.