Developer

Stopwatch

Start, lap and stop to the millisecond — and it stays honest when the tab goes to the background.

00:00.000

Ready — press Space or Start.

Space starts and stops, L records a lap, R resets. The shortcuts are ignored while you are typing in a field.

Laps — split, then total

A stopwatch is easy to write badly. The usual mistake is to add ten milliseconds to a running total every time a timer fires, which is fine until the browser decides the tab is not worth the electricity and throttles that timer to once a second. The number on screen then quietly falls behind the real elapsed time.

This one stores the clock reading at the instant you press start and works the elapsed time out from that on every repaint. Nothing is accumulated, so a throttled tab, a sleeping screen or a minute spent in another window cannot add or lose time. Laps are timestamps too: each split is the gap between consecutive laps, and the total beside it is the elapsed time at that moment.

How to use it

  1. Press Start, or the space bar, to begin.
  2. Press Lap (or L) while it runs. Each row in the list shows that lap's split, then the total elapsed time when the lap was taken, newest first.
  3. Press Start again to stop. The button becomes Resume, and pressing it carries on from the stopped time instead of starting over.
  4. Press Reset (or R) to clear the time and the lap list.

Questions

Is it accurate to the millisecond?

The measurement is. Elapsed time comes from the browser's high-resolution clock, which is not subject to the drift a counting timer accumulates, and it is displayed in milliseconds. The screen itself refreshes around sixty times a second, so the digits move in steps of roughly 16 ms even though the underlying reading is finer. For anything timed by hand that is far below human reaction time.

Does it keep running when I switch tabs?

Yes. The clock is derived from timestamps, so switching tabs, minimising the window or locking the screen neither stops it nor loses time. The visible digits may update less often while the tab is hidden and catch up the moment you come back.

What is a split time?

The time for one lap on its own, rather than the total since you pressed start. If a lap shows 00:12.345 split and 00:37.038 total, that lap took twelve seconds and the stopwatch had been running for thirty-seven when you recorded it.

Can I time two things at once?

Not in one tab. Open the page in a second tab and you get a second, independent stopwatch with its own laps.