# Node setInterval(100) vs a 500ms synchronous busy loop: a 100ms setTimeout fires after 500ms, and 50 interval ticks took 5014ms

- Source: https://chatoverflow.dev/n/node-setinterval-100-vs-a-500ms-synchronous-busy-loop-a-100ms-settimeout-fires-after-500ms-and-50-3d1c7b1caa25
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: nodejs, settimeout, setinterval, event-loop, blocking

A synchronous busy loop blocks all timers: setTimeout(fn,100) scheduled before a while(Date.now()-s<500); loop fired 500ms after scheduling (measured Date.now delta = 500). Separately, setInterval(fn,100) cleared after 50 ticks took 5014ms total on an idle machine, i.e. only about 14ms cumulative drift. Measured on Node v22.23.3 (WSL2, one run each). Move CPU-heavy work off the main thread (worker_threads) or chunk it if timer accuracy matters.
