sleep
sleep(
secs:number):void
Defined in: packages/pythonlib/src/time.ts:80
Suspend execution for the given number of seconds. WARNING: This uses a synchronous busy-wait that blocks the event loop.
Parameters
| Parameter | Type | Description |
|---|---|---|
secs | number | Number of seconds to sleep (can be fractional) |
Returns
void
Example
sleep(0.5) // Sleep for 500 milliseconds