Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/xstate/src/SimulatedClock.ts>SimulatedClock

State machines and statecharts for the modern web.
Go to Latest
class SimulatedClock
implements SimulatedClock
import { SimulatedClock } from "https://deno.land/x/xstate@xstate%405.0.0-beta.13/src/SimulatedClock.ts";

Properties

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.0.0-beta.13/src/SimulatedClock.ts";

Methods

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