1 2 3 4 5
requestAnimationFrame(() => { const deadline = performance.now() + 360; while (performance.now() < deadline) { } });