The usleep function in Linux suspends the calling thread for a specified number of microseconds.
The usecs argument is the number of microseconds to suspend the thread.
For example, the following code will suspend the calling thread for 100 microseconds:
#include <unistd.h> int main() { usleep(100); return 0; }
Last updated 2 years ago