int usleep(useconds_t period);
The usleep() function
suspends the calling thread until either the number of real-time
microseconds specified by period has elapsed or a signal
is delivered to the calling thread. The suspension time may be
longer than requested because the argument value is rounded up to
an integer multiple of the sleep resolution, or due to the
scheduling of other activity by the system.
Is the number of real-time (as opposed to CPU-time) microseconds to suspend
the calling thread. This value must be less than 1,000,000. If this
value is 0, the call has no effect.
If successful, usleep()
returns 0. On failure, it returns -1 and sets errno to
one of the following values:
period is greater than or
equal to 1,000,000.
usleep() is implemented using an interruptible
wait() function, and does not use signals.
Hence there are no interactions with SIGALRM handling, or
with any other wait function (for example, sleep()),
as there are on some UNIX platforms.
On Vista/7/2008/8/2012/10, waitable timers with 100-nanosecond resolution are available,
so usleep() has microsecond accuracy.
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
- alarm(), getitimer(), kill(), nanosleep(), nap(), pause(), sigaction(), signal(), sigpause(), sleep()
PTC MKS Toolkit 10.0 Documentation Build 6.