FixedIntervalTickSource
Defined in: src/modules/tick/fixed-interval-tick-source.ts:19
Time-driven tick source that fires at a fixed interval via setInterval.
Suitable for:
- Real-time prototypes (arcade games, sandboxes) that want a simple “simulate at N Hz” timer without building a fixed-step accumulator.
- Any consumer where drift under tab-throttling is acceptable.
Emits TickInfo { kind: 'fixed', deltaMs: intervalMs, tickNumber }.
deltaMs is the nominal interval, not the measured wall time — callers
that need wall-time accuracy should use an rAF-driven source instead.
start() and stop() are idempotent; calling either repeatedly is a
no-op in the already-started/stopped state. Unsubscribed handlers stop
receiving ticks, but the interval timer remains active until stop() is
explicitly called — callers are responsible for stopping the source.
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new FixedIntervalTickSource(
intervalMs):FixedIntervalTickSource
Defined in: src/modules/tick/fixed-interval-tick-source.ts:25
Parameters
Section titled “Parameters”intervalMs
Section titled “intervalMs”number
Returns
Section titled “Returns”FixedIntervalTickSource
Accessors
Section titled “Accessors”tickNumber
Section titled “tickNumber”Get Signature
Section titled “Get Signature”get tickNumber():
number
Defined in: src/modules/tick/fixed-interval-tick-source.ts:59
Returns
Section titled “Returns”number
Methods
Section titled “Methods”start()
Section titled “start()”start():
void
Defined in: src/modules/tick/fixed-interval-tick-source.ts:41
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”stop()
Section titled “stop()”stop():
void
Defined in: src/modules/tick/fixed-interval-tick-source.ts:47
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”subscribe()
Section titled “subscribe()”subscribe(
handler): () =>void
Defined in: src/modules/tick/fixed-interval-tick-source.ts:54
Parameters
Section titled “Parameters”handler
Section titled “handler”(info) => void
Returns
Section titled “Returns”() => void