MCPcopy
hub / github.com/statelyai/xstate / setTimeout

Method setTimeout

packages/core/src/SimulatedClock.ts:29–38  ·  view source on GitHub ↗
(fn: (...args: any[]) => void, timeout: number)

Source from the content-addressed store, hash-verified

27 return this._id++;
28 }
29 public setTimeout(fn: (...args: any[]) => void, timeout: number) {
30 this._flushingInvalidated = this._flushing;
31 const id = this.getId();
32 this.timeouts.set(id, {
33 start: this.now(),
34 timeout,
35 fn
36 });
37 return id;
38 }
39 public clearTimeout(id: number) {
40 this._flushingInvalidated = this._flushing;
41 this.timeouts.delete(id);

Callers

nothing calls this directly

Calls 3

getIdMethod · 0.95
nowMethod · 0.95
setMethod · 0.65

Tested by

no test coverage detected