Calling usleep() suspends execution of the process for the specified number of microseconds (in this, it is a "microsleep", hence the name; think μsleep()).

This function is even less standardised than nanosleep(), and its behaviour in the presence of signals is less specified that that system call's. However, it may be more common on older platforms.

Like nanosleep() and even sleep(), usleep() may well sleep for longer than specified. The time given is only the minimal length of (real, wall clock time) to sleep.

Log in or register to write something here or to contact authors.