API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classClock

@codexo/exojs / core / stable

High-precision wall-clock that accumulates elapsed time while running. Reads from performance.now via `getPreciseTime`. Use Clock.start, Clock.stop, Clock.reset, and Clock.restart to control the running state; read elapsed time via Clock.elapsedTime (the Time instance is shared — copy it if you need to keep a snapshot). Use Timer for a clock with a fixed limit and `expired` flag.

6
props
5
methods
0
events
Import
import { Clock } from '@codexo/exojs'

High-precision wall-clock that accumulates elapsed time while running. Reads from performance.now via `getPreciseTime`. Use Clock.start, Clock.stop, Clock.reset, and Clock.restart to control the running state; read elapsed time via Clock.elapsedTime (the Time instance is shared — copy it if you need to keep a snapshot).

Use Timer for a clock with a fixed limit and `expired` flag.

Constructors 1
new(startTime: Time, autoStart: boolean): Clock
Methods 5
destroy(): void
reset(): this
restart(): this
start(): this
stop(): this
Properties 6
elapsedHours: number
elapsedMilliseconds: number
elapsedMinutes: number
elapsedSeconds: number
elapsedTime: Time
running: boolean
Source