跳到主要内容

Flow

Time control flow related classes providing loop, wait, and other time management functionality.

Functions

all

function all(...generators: Generator[]): Generator;

Runs multiple generators in parallel.

loop

function loop(callback: () => void, times: number): Generator;

Repeats the callback function for a specified number of times.

loopFor

function loopFor(duration: number, callback: (time: number) => void): Generator;

Repeats the callback function for a specified duration.

loopUntil

function loopUntil(condition: () => boolean, callback?: () => void): Generator;

Loops until the condition is met.

waitUntil

function waitUntil(condition: () => boolean): Generator;

Waits until the condition is met.

Classes

  • Every - Timer executor
  • Loop - Loop controller