#timers

[ follow ]
JavaScript
fromRead the Tea Leaves
2 weeks ago

Why do browsers throttle JavaScript timers?

Browsers clamp setTimeout(0) to a minimum (commonly 4ms) to prevent abuse, altering timer behavior and motivating use of setImmediate or microtasks.
[ Load more ]