usleep() - suspend process execution for interval of microseconds
#include <unistd.h>
int usleep(useconds_t microseconds)
The usleep(3) function suspends the calling process for at least the number of microseconds specified by microseconds. The value of microseconds must be less than one million (1,000,000).
The function uses the process' real-time interval timer; there is one timer for each process. The usleep(3) function does not interfere with any previous setting of the timer. If the timer is set to notify the process while usleep(3) has it suspended, the process is woken up shortly before the timer expires.
Because of other activity or time spent processing the call, the process may be suspended for longer than microseconds.
The usleep(3) function exits with status 0 for success, and >0 if an error occurred.
The usleep(3) function may fail for these reasons:
alarm(2)
getitimer(2)
sigaction(2)
sleep(3)