-static void nsleep(uint64_t n) {
- struct timespec timeout;
- timeout.tv_sec = n/1000000000;
- timeout.tv_nsec = n%1000000000;
- while (nanosleep(&timeout, &timeout) && errno == EINTR);
-}
-
-void msleep(uint32_t n) {
- nsleep(1000000 * n);
-}
-
-#endif // _WIN32