Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/xstate/src/SimulatedClock.ts>SimulatedClock

Actor-based state management & orchestration for complex app logic.
Go to Latest
class SimulatedClock
implements SimulatedClock
import { SimulatedClock } from "https://deno.land/x/xstate@xstate@5.9.1/src/SimulatedClock.ts";

Properties

private
_flushing: boolean
private
_flushingInvalidated: boolean
private
_id: number
private
_now: number
private
timeouts: Map<number, SimulatedTimeout>

Methods

private
flushTimeouts()
private
getId()
clearTimeout(id: number)
increment(ms: number): void
now()
set(time: number)
setTimeout(fn: (...args: any[]) => void, timeout: number)
interface SimulatedClock
implements Clock
import { type SimulatedClock } from "https://deno.land/x/xstate@xstate@5.9.1/src/SimulatedClock.ts";

Methods

start(speed: number): void
increment(ms: number): void
set(ms: number): void