Watchstop
00:00.00

Overview

Runtime-agnostic stopwatch core and framework adapters.

Welcome to Watchstop.

Core docs are the source of truth. Implement packages from those pages, not from guesses.

Elapsed math

How does the time shown stay correct while the wall clock keeps moving during a pause?

A pause must not add to the time shown. Elapsed is subtracting clock readings, not counting frames.

Step 1 / 7

start sets the clock reading at Start from clock.now()

Concept map
equals when stoppedincludes when runningexcludesisis copied fromsetsunsetsfolds open segment intotime shownelapsed0banked from earlier runsaccumulated0since you pressed Startopen segment0paused time, not countedidle0clock now minus start readingnow − startTime—clock reading at StartstartTimeunsetwall clock, always movingclock.now()0startstop
Counting wall clock (wrong)
Watchstop (pause not counted)

Running several stopwatches at once, or changing how often the UI updates? That is scheduling rather than math — see Data flow while running.

Normative methods: Stopwatch. Notify buckets: Options. now() units: Clock.

Start here

Machine indexes: /llms.txt and /llms-full.txt.

On this page