Signature
s32 usleep(u32 usec)
Parameters
usec : microseconds to sleep
return value :
0 after sleepingPauses 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:
For whole-second waits, use sleep().
Example
usleep(1000);
print("slept\n");
Output
slept