Skip to content

TimerScheduler

Defined in: src/ActorContext.ts:161

Actor-scoped scheduler. A fresh startSingleTimer/startTimerWithFixedDelay call with the same key replaces any existing timer under that key.

TMsg = unknown

activeKeys(): string[]

Defined in: src/ActorContext.ts:183

Names of active timers (diagnostics).

string[]


cancel(key): boolean

Defined in: src/ActorContext.ts:174

Cancel a specific timer. Returns true if a timer was actually running.

string

boolean


cancelAll(): void

Defined in: src/ActorContext.ts:177

Cancel every timer this actor has started.

void


isTimerActive(key): boolean

Defined in: src/ActorContext.ts:180

True if the timer under key is still scheduled to fire.

string

boolean


startSingleTimer(key, message, delayMs): void

Defined in: src/ActorContext.ts:163

Fire message once after delayMs.

string

TMsg

number

void


startTimerWithFixedDelay(key, message, intervalMs, initialDelayMs?): void

Defined in: src/ActorContext.ts:166

Fire message every intervalMs, optionally preceded by initialDelayMs.

string

TMsg

number

number

void