v135 ยท javascript

Remove clamping of setInterval(...) to >= 1ms

Currently setInterval with a value less than 1 is clamped to 1. This intent removes that restriction.

concepts

  1. setInterval clamp removed

    Single-line read: the 1 ms minimum is gone; behaviour matches setTimeout.

  2. Sub-millisecond loop, measured

    The high-cadence use case from the explainer: physics ticks and audio scheduling. Pick a requested interval, see observed cadence and rate in Hz.

  3. setInterval precision bench

    Pick a target interval (down to 0.1ms) and let the bench fire for two seconds. A histogram shows actual delivered intervals, median, min, and max — with the 1ms clamp visible as a red wall when active.

  4. Timer accuracy lab

    Compare setInterval, setTimeout, and requestAnimationFrame at sub-millisecond requested delays. Scatter plot of 200 samples, median and clamping detection โ€” shows exactly when Chrome 135 removes the 1ms floor in cross-origin isolated contexts.

why it shipped

Currently setInterval with a value less than 1 is clamped to 1. This intent removes that restriction.

references