Rule of thumb · DIYNº 92 / 96

A naive timer drifts, a correct one can’t

Adding up tick intervals compounds every small delay into permanent error — computing elapsed time as now minus a fixed start point means a single slow tick costs you nothing, because the next measurement is still anchored to the same origin.

Why it works

Verified against a realistic scenario: a timer ticking every 100ms, each tick actually taking 103ms under normal browser load, reports a perfect 60.00s after 600 ticks while only 58.20s has really passed — a 1.8-second error in under a minute from accumulation alone.

Do it exactly

Estimate with the rule, then check it against the calculator that models it properly.

Open Precision Timer & Stopwatch →

More in DIY

← PreviousEgg cooking time scales with mass to the two-thirds power, not linearly Next →Mid-market is not what you get at the bank

Browse all 96 rules of thumb →