How a browser stopwatch stays accurate
Why counting timestamps beats counting ticks, how splits and totals are built, and why background tabs do not spoil the time.
Timestamps beat ticking
A naive stopwatch adds a fixed amount every time a timer fires, but browsers do not fire timers on a perfect schedule, especially under load. This stopwatch instead records the wall-clock moment you press Start and, on every refresh, subtracts it from the current moment to get the true elapsed time. Small hiccups in the refresh rate then only affect how often the number redraws, never its accuracy. The value shown always reflects real elapsed time rather than an accumulated count of imperfect ticks.
Truncated centiseconds
The display shows hundredths of a second, and those hundredths are truncated rather than rounded. Rounding could momentarily show a hundredth that has not fully elapsed, which would let the readout run ahead of reality. Truncation guarantees the shown time is always at or just behind the genuine elapsed time, which is the honest behaviour for a timer. It is a small choice that keeps split comparisons trustworthy.
Building splits from totals
Every time you tap Lap, the stopwatch stores the total elapsed time at that instant. The per-lap split is then the difference between one stored total and the previous one, so the first lap's split equals its total and each later split is a clean gap. Keeping the raw totals and deriving splits from them means no rounding error compounds across many laps. It also lets the tool highlight the fastest and slowest laps by simply comparing the derived splits.
Surviving background tabs
Browsers slow or pause timers in tabs you are not looking at to save power, which would freeze a tick-counting stopwatch. Because this one derives elapsed time from timestamps, the moment you return to the tab it recomputes against the current clock and shows the correct time, as if it never paused. The only visible effect of a background tab is that the number stops redrawing until you come back. The underlying measurement is untouched.