30 #if _WIN32 && !defined(__MINGW32__) 35 nanosleep(
const struct timespec *rqtp,
struct timespec *rmtp)
37 int errsv = clock_nanosleep(CLOCK_REALTIME, 0, rqtp, rmtp);
46 sleep(
unsigned seconds)
48 struct timespec rqtp = { seconds, 0 };
49 struct timespec rmtp = { 0, 0 };
51 if (nanosleep(&rqtp, &rmtp) == -1) {
53 return (
unsigned)rmtp.tv_sec;
59 #endif // _WIN32 && !__MINGW32__ This header file is part of the C11 and POSIX compatibility library; it includes <unistd.h>, if it exists, and defines any missing functionality.
This header file is part of the C11 and POSIX compatibility library; it includes <time.h> and defines any missing functionality.
This is the internal header file of the C11 and POSIX compatibility library.