timer drift

The growing gap between when a timer was asked to fire and when it actually fires, caused by a busy thread or scheduling delays.

In more detail

Timers never fire early but can fire late, and with repeated timers the lateness adds up. Measuring the actual time with performance.now() and shortening the next delay compensates for it.

Related terms

Taught in

References