← Back to Docs
  • index.html
  • Clayground
  • Clayground.Lab
  • Stopwatch
  • Clayground 2026.7
  • Stopwatch QML Type

    How long something took, in simulated seconds: click to start, click to stop. More...

    Import Statement: import Clayground.Lab
    Inherits:

    HandheldInstrument

    Properties

    Detailed Description

    The second instrument the kernel ships, and the one that shows the handheld contract is about binding rather than about pointing: a stopwatch picks moments instead of places. The click is the same click - marking now is as much a pick as marking a spot on the ground - so it needs no gesture of its own, no mode of its own and no code in the input layer. Only pickKind differs, and with it the fact that where the cursor was is ignored.

    It runs on SimClock time, never on the wall clock. That is not a detail: a lab's whole determinism contract is that a seeded run replays identically, and a stopwatch reading in real seconds would be the one number in the building that changed between two runs of the same experiment. Pausing the lab pauses the watch, stepping the lab steps it.

    Third click starts a fresh timing - the instrument is never in a state where a click does nothing.

    See also HandheldInstrument, InstrumentBelt, and SimClock.

    Property Documentation

    running : bool [read-only]

    Started and not yet stopped.


    stopped : bool [read-only]

    A completed timing is on the face.