Why browser stopwatches usually drift
Most are built by adding ten milliseconds to a counter on a repeating interval. Browsers throttle those intervals hard in a background tab, often to once a second or once a minute, so the count falls behind the moment you switch away.
This one records the wall-clock instant you pressed start and subtracts it from the current time. The display refresh rate has no bearing on the elapsed value, so a tab that was hidden for ten minutes comes back showing exactly ten more minutes.





