跳转到内容
简体中文

Scheduler

此内容尚不支持你的语言。

Defined in: src/Scheduler.ts:47

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:77

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

T

number

number

ActorRef<T>

T

ActorRef<unknown> | null

Cancellable


scheduleAtFixedRateFunction(initialDelayMs, intervalMs, task): Cancellable

Defined in: src/Scheduler.ts:87

number

number

() => void

Cancellable


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

Defined in: src/Scheduler.ts:62

Deliver a message once after a delay.

T

number

ActorRef<T>

T

ActorRef<unknown> | null

Cancellable


scheduleOnceFunction(delayMs, task): Cancellable

Defined in: src/Scheduler.ts:72

Run a user-supplied function once after a delay.

number

() => void

Cancellable