Skip to main content

Class: BusSimTimeDelayTimer

Defined in: src/sdk/utils/time/BusSimTimeDelayTimer.ts:118

A timer that allows for scheduling delayed callbacks using time supplied by the event bus and ClockPublisher's simTime event.

Constructors

Constructor

new BusSimTimeDelayTimer(bus): BusSimTimeDelayTimer

Defined in: src/sdk/utils/time/BusSimTimeDelayTimer.ts:126

Creates an instance of a BusSimTimeDelayTimer.

Parameters

ParameterTypeDescription
busEventBusThe event bus to use with this instance.

Returns

BusSimTimeDelayTimer

Methods

clear()

clear(): void

Defined in: src/sdk/utils/time/BusSimTimeDelayTimer.ts:157

Clears this timer of any pending actions. Actions that are cleared will not be executed.

Returns

void


isPending()

isPending(): boolean

Defined in: src/sdk/utils/time/BusSimTimeDelayTimer.ts:136

Checks whether an action is pending on this timer.

Returns

boolean

Whether an action is pending on this timer.


schedule()

schedule(action, delay): void

Defined in: src/sdk/utils/time/BusSimTimeDelayTimer.ts:146

Schedules an action. Waits for a specified amount of time, and executes the action only if no other action is scheduled on this timer during the delay.

Parameters

ParameterTypeDescription
action() => voidThe action to schedule.
delaynumberThe debounce delay, in milliseconds.

Returns

void