API reference

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

C

classTimer

@codexo/exojs / core / stable

Clock variant with a fixed limit. Inherits start/stop/reset/restart semantics; adds Timer.expired (true once the elapsed time reaches the limit) and remaining-time accessors. Useful for cooldowns, delays, and any timed gating logic where you want to ask "is the duration up?" each frame.

11
props
5
methods
0
events
Import
import { Timer } from '@codexo/exojs'

Clock variant with a fixed limit. Inherits start/stop/reset/restart semantics; adds Timer.expired (true once the elapsed time reaches the limit) and remaining-time accessors. Useful for cooldowns, delays, and any timed gating logic where you want to ask "is the duration up?" each frame.

Constructors1
Methods5
destroy(): void
reset(): this
Halt and zero the accumulated time. The clock is left stopped.
restart(): this
Reset accumulated time to zero, then immediately start. Common per-frame pattern.
start(): this
Begin accumulating time. No-op when already running.
stop(): this
Halt accumulation. Elapsed time stays at the moment of stopping.
Properties11
elapsedHours: number
Clock.elapsedMilliseconds in hours.
Total accumulated time since the last Clock.reset. While the clock is running the value advances on every read, folding in the interval since the previous one; while stopped it stays at the moment of stopping.
elapsedMinutes: number
Clock.elapsedMilliseconds in minutes.
expired: boolean
true once the elapsed time has reached or exceeded the configured limit.
remainingHours: number
Timer.remainingSeconds in hours.
remainingMinutes: number
Timer.remainingSeconds in minutes.
running: boolean
Source