sleep
Signature
Section titled “Signature”function sleep(duration: string | number): Promise<void>def sleep(duration: int | float | str) -> NoneParameters
Section titled “Parameters”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.
Return value
Section titled “Return value”void when the timer fires.
Durable semantics
Section titled “Durable semantics”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.
Failure
Section titled “Failure”An unparseable duration string fails at that call. Outside an Execution, the call throws.
Example
Section titled “Example”await sleep(60_000);