30#if _WIN32 && !defined(__MINGW32__)
37 int errsv = clock_nanosleep(CLOCK_REALTIME, 0, rqtp, rmtp);
46sleep(
unsigned seconds)
48 struct timespec rqtp = { seconds, 0 };
51 if (nanosleep(&rqtp, &rmtp) == -1) {
53 return (
unsigned)rmtp.
tv_sec;
This header file is part of the C11 and POSIX compatibility library; it includes <time....
This is the internal header file of the C11 and POSIX compatibility library.
A time type with nanosecond resolution.
time_t tv_sec
Whole seconds (>= 0).
This header file is part of the C11 and POSIX compatibility library; it includes <unistd....
unsigned sleep(unsigned seconds)
Sleeps until the specified number of realtime seconds has elapsed or the calling thread is interrupte...