wait
Yields the current thread for seconds (default 0.03). Resumes on the VM scheduler.
Syntax
wait(seconds?: number) -> any
Parameters
| Parameter | Type | Description |
|---|---|---|
seconds? | number | A duration in seconds. |
Returns
| Type | Description |
|---|---|
any | Yields |
Description
wait is part of the Core functions library. Core globals are installed in every executor thread and drive output, scheduling and identity.
The calling thread yields as needed and resumes on the module scheduler when the operation completes.
Example
print("before")
wait(0.5)
print("after")
Notes
- Core globals are available in every script.