v135 · javascript
Timer Accuracy Lab
Measure the actual firing intervals of setInterval, setTimeout, and requestAnimationFrame at sub-millisecond requested delays. Chrome 135 removes the 1ms minimum clamp in certain contexts. The scatter plot shows the distribution of real inter-fire gaps across 200 samples.
checking timer precision…
Historically, browsers clamped
setInterval and setTimeout to a minimum of 1ms to reduce fingerprinting surface and CPU wake overhead. Chrome 135 removes this clamp in contexts where high-resolution timers are already permitted (e.g. cross-origin isolated pages). This lab measures the real minimum achievable interval and scatter across 200 ticks.
Configure
Inter-fire interval distribution
Each dot = one inter-fire gap. X = sample index, Y = actual interval (ms). Blue line = requested delay, orange = median.
Statistics
Samples
—
Minimum (ms)
—
Median (ms)
—
Maximum (ms)
—
Std deviation
—
Clamped? (≥1ms min)
—
Compare all three timer types
setInterval(fn, 0)
Min interval after Chrome 135 clamp removal. Expected: < 1ms in isolated contexts.
—
setTimeout(fn, 0) recursive
Same clamp behaviour, recursive chaining.
—
requestAnimationFrame
Display-sync: ~16.6ms at 60Hz or ~8.3ms at 120Hz. No clamp applies.
—
What changed in Chrome 135
// Before Chrome 135 — 1ms minimum clamp enforced everywhere:
setInterval(() => {
// Called every ~1ms minimum, even if delay=0
}, 0); // ← effective delay: 1ms
// Chrome 135 — clamp removed in cross-origin isolated contexts:
setInterval(() => {
// Now fires at actual 0ms delay (OS-scheduler permitting)
}, 0); // ← effective delay: <1ms possible
// Context required for sub-1ms timers:
// Cross-Origin-Opener-Policy: same-origin
// Cross-Origin-Embedder-Policy: require-corp
// window.crossOriginIsolated === true