Skip to content

Scheduler

Defined in: src/Scheduler.ts:27

Time-based scheduler — a thin wrapper over setTimeout / setInterval, accurate enough for typical use and good enough for tests. Inject a ManualScheduler from the TestKit when you want fully deterministic time advancement.

new Scheduler(): Scheduler

Scheduler

scheduleAtFixedRate<T>(initialDelayMs, intervalMs, target, message, sender?): Cancellable

Defined in: src/Scheduler.ts:60

Deliver a message repeatedly at a fixed interval, after an initial delay.

T

number

number

ActorRef<T>

T

ActorRef<unknown> | null

Cancellable


scheduleAtFixedRateFn(initialDelayMs, intervalMs, fn): Cancellable

Defined in: src/Scheduler.ts:88

number

number

() => void

Cancellable


scheduleOnce<T>(delayMs, target, message, sender?): Cancellable

Defined in: src/Scheduler.ts:31

Deliver a message once after a delay.

T

number

ActorRef<T>

T

ActorRef<unknown> | null

Cancellable


scheduleOnceFn(delayMs, fn): Cancellable

Defined in: src/Scheduler.ts:47

Run a user-supplied function once after a delay.

number

() => void

Cancellable