Skip to main content
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%405.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%405.9.1/src/SimulatedClock.ts";

Methods

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