Skip to main content

Type Alias: ClockMode

ClockMode = "manual" | "realtime"

Defined in: types.ts:13

How the game clock advances.

Remarks

  • "manual" - game time only moves when Clock.advance or Clock.set is called. Fully deterministic, which makes saves, replays, and tests reproducible. This is the default.
  • "realtime" - game time flows with wall-clock time, multiplied by ClockState.scale. The value is computed on read, so no timer has to run for the clock to stay correct across saves, reloads, and suspended tabs.