24 lines
471 B
Plaintext
24 lines
471 B
Plaintext
:sig
|
|
int usleep(unsigned int usec)
|
|
|
|
:params
|
|
usec : microseconds to sleep
|
|
return value : `0` after sleeping
|
|
|
|
:see
|
|
>time
|
|
sleep
|
|
|
|
:content
|
|
Pauses the current request or task for a number of microseconds.
|
|
|
|
Use this for short waits in local tests, polling loops, or background tasks. Avoid long sleeps in normal HTTP render paths because they hold a worker process for the duration.
|
|
|
|
Example:
|
|
|
|
```uce
|
|
usleep(250000); // 0.25 seconds
|
|
```
|
|
|
|
For whole-second waits, use `sleep()`.
|