Skip to content
Trigora
Start building →

sleep

function sleep(duration: string | number): Promise<void>
def sleep(duration: int | float | str) -> None
  • duration — a number of milliseconds, or a duration string. Use a number unless you have confirmed the string form against the runtime you are deploying to.

void when the timer fires.

The Execution stores wakeAt and waits with { type: "timer", wakeAt }. A crash before the wake does not restart the duration from zero. The scheduler, not trigora send, resumes the Execution. Waiting wall-clock is not compute billing on Cloud.

An unparseable duration string fails at that call. Outside an Execution, the call throws.

await sleep(60_000);