API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classClock
High-precision clock that accumulates elapsed time while running. Reads the host's monotonic clock unless a TimeSource is supplied - pass an application's platform adapter to follow its time, or any object with a `now()` to drive the clock deterministically from a test. Use Clock.start, Clock.stop, Clock.reset, and Clock.restart to control the running state; read elapsed time via Clock.elapsedSeconds. Use Timer for a clock with a fixed limit and `expired` flag.
import { Clock } from '@codexo/exojs'High-precision clock that accumulates elapsed time while running. Reads the host's monotonic clock unless a TimeSource is supplied - pass an application's platform adapter to follow its time, or any object with a `now()` to drive the clock deterministically from a test. Use Clock.start, Clock.stop, Clock.reset, and Clock.restart to control the running state; read elapsed time via Clock.elapsedSeconds.
Use Timer for a clock with a fixed limit and `expired` flag.
new(autoStart: boolean, timeSource: TimeSourceA monotonic millisecond clock. Values are only meaningful relative to each other: the origin is the host's, never the wall clock, and the source never jumps ba…): Clockdestroy(): voidreset(): thisrestart(): thisstart(): thisstop(): thiselapsedHours: numberelapsedMinutes: numberrunning: boolean