make style
Philippe Teuwen
11 years ago
49 | 49 | #ifndef _WIN32 |
50 | 50 | # include <time.h> |
51 | 51 | # define msleep(x) do { \ |
52 | struct timespec xsleep; \ | |
53 | xsleep.tv_sec = x / 1000; \ | |
54 | xsleep.tv_nsec = (x - xsleep.tv_sec * 1000) * 1000 * 1000; \ | |
55 | nanosleep(&xsleep, NULL); \ | |
56 | } while (0) | |
52 | struct timespec xsleep; \ | |
53 | xsleep.tv_sec = x / 1000; \ | |
54 | xsleep.tv_nsec = (x - xsleep.tv_sec * 1000) * 1000 * 1000; \ | |
55 | nanosleep(&xsleep, NULL); \ | |
56 | } while (0) | |
57 | 57 | #else |
58 | 58 | # include <winbase.h> |
59 | 59 | # define msleep Sleep |