1 2 3 4 5
window.requestAnimationFrame(function() { /* Generate a slow task. */ const begin = window.performance.now(); while (window.performance.now() < begin + 60); });