API reference › @evolu/common › Schedule › fromDelay
function fromDelay(
delay: Duration,
): Schedule<
number &
Brand<"Int"> &
Brand<"NonNegative"> &
Brand<"LessThan281474976710655"> &
Brand<"Millis">
>;
Defined in: packages/common/src/Schedule.ts:409
A schedule that runs once with a single delay.
Convenience for take(1)(spaced(delay)). Useful for simple one-shot delays.
Example
// Wait 1 second then stop
const oneShot = fromDelay("1s");