The clock, countdown and stopwatch share a screen but answer different questions with different methods. A precise-looking display is not proof that every tool measures time the same way.
Three methods in the current implementation
| Tool | Method | Important limit |
|---|---|---|
| Clock | Reads the device’s current local date and time when updating. | Wrong device time means a wrong displayed time. |
| Countdown | Subtracts one from remaining seconds for each scheduled one-second callback. | Delayed callbacks can make the countdown finish late. |
| Stopwatch | Calculates the difference between device-clock timestamps while running. | Wall-clock adjustments can change the result. |
This table comes from examining XClock’s runtime, not from a claim of certified accuracy. The rebuild preserves these timing methods; it does not silently replace them with a different timing engine.
A requested interval is not a reserved appointment
Asking the browser to run code after a delay does not reserve an exact instant. Other work or browser power-saving behavior can postpone it. MDN explains that the actual delay can exceed the requested delay. In XClock’s current countdown, missed time is not automatically recovered by subtracting the full wall-clock gap.
For example, if a one-second decrement runs only once during a longer delay, the remaining display falls by one second, not by the whole delay. This is an explanation of the algorithm, not a measured drift estimate for your device. We do not publish an “accurate to X milliseconds” claim.
What the stopwatch’s hundredths mean
The hundredths field formats the computed elapsed value. It does not mean the screen refreshed at every hundredth or that a person pressed the button at an exact hundredth. A busy or hidden page may skip visible values while the next calculation uses a later device-clock reading.
XClock currently uses a wall-clock timestamp for that difference. It does not use a separately calibrated clock. Changing the system clock during a run is therefore outside a reliable measurement procedure. For the distinction between timestamps and local time zones, see MDN’s Date reference.
Run a comparison that answers a real question
- Choose a reference device you trust for your use case and a short test duration.
- Start one XClock countdown and note the reference start and finish.
- Repeat with the tab backgrounded while keeping the device awake.
- Record browser version, device, duration, power settings and observed difference.
- Do not generalize from that device to overnight sleep or another browser.
Our testing page separates completed checks from scenarios not tested. A short functional smoke test confirms controls, not universal accuracy.
Choose by consequence
A rehearsal checkpoint, short desk break or practice interval can tolerate uncertainty that a clinical, laboratory or official sporting measurement cannot. For a hard deadline, use a suitable dedicated device or service and a backup. For routine use, keep the browser page available and check sound before starting.
Go to the Timer for independent durations, Stopwatch for elapsed checkpoints, or Alarm for a local time-of-day reminder. The timer API reference provides the browser-level background.