Accuracy by design
A naive browser timer accumulates error; a well-built one doesn’t. The difference is architectural: instead of counting ticks, this tool anchors to the system epoch (milliseconds since 1 Jan 1970) and derives elapsed time by subtraction. The visual updates ride on requestAnimationFrame, which syncs redraws to your display’s refresh rate (typically 60–120fps) for smooth digits — but the truth of the time always comes from the clock, not from how many frames have rendered. That’s why it survives tab switches, throttling, and momentary freezes.
Stopwatch vs countdown
| Mode | Counts | Common use |
|---|---|---|
| Stopwatch | Up from zero, with laps | Workouts, debugging, timing tasks |
| Countdown | Down to zero, with an alert | Cooking, presentations, breaks |
Lap times capture split intervals at millisecond precision — useful for comparing repeated efforts (sets, test runs) without resetting.
State that survives a reload
Active timer configuration and lap markers can be serialized to localStorage, so an accidental refresh doesn’t wipe a running session — the timer re-instantiates and resumes from the correct point (again via the stored start timestamp, not a counted value). Everything stays on your device; nothing is sent anywhere.
When you want structured focus instead
A bare countdown is perfect for one-off timing, but if your goal is sustained focus with built-in breaks, the Pomodoro Timer wraps the same accurate-timing core in a work/break cycle with session tracking. Use the stopwatch for measuring, the Pomodoro for managing attention.