long nap(long period);
The nap() function
suspends the calling thread until either the number of real-time
milliseconds specified by period has elapsed or a signal
is delivered to the calling thread. The suspension time may be
longer than requested due to the scheduling of other activity by
Is the number of real-time (as opposed to CPU-time) milliseconds to suspend
the calling thread.
If successful, nap() returns a long integer that indicates
the number of milliseconds actually slept. On failure, it returns a value of
-1 and sets errno to one of the following values:
A signal interrupted the call.
nap() 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.
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
- alarm(), getitimer(), kill(), nanosleep(), pause(), sigaction(), signal(), sigpause(), sleep(), usleep()
PTC MKS Toolkit 10.3 Documentation Build 39.