SYNOPSIS
#include <time.h>
int nanosleep(const struct timespec *req, struct timespec *rem);
DESCRIPTION
The
PARAMETERS
- req
-
Is the number of real-time (as opposed to CPU-time) seconds and nanoseconds to suspend the calling thread.
- rem
-
Points to a structure to receive the remaining time if
nanosleep() is interrupted by a signal. This pointer may be NULL.
RETURN VALUES
If successful,
- EINTR
-
A signal interrupted the call.
- EINVAL
-
req specifies a nanosecond value greater than or equal to 1,000 million.
CONFORMANCE
UNIX 98.
MULTITHREAD SAFETY LEVEL
MT-Safe.
PORTING ISSUES
On 8.1/2012R2/10/2016/2019/11/2022, waitable timers with 100-nanosecond resolution are available, so
AVAILABILITY
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
SEE ALSO
- Functions:
_NutConf() ,alarm() ,getitimer() ,kill() ,nap() ,pause() ,sigaction() ,signal() ,sigpause() ,sleep() ,usleep()
PTC MKS Toolkit 10.4 Documentation Build 39.