4 /*! Utility function to have a sleep function with better resolution and
5 * which only stops one thread. */
14 // Windows version of my_sleep() function
15 static void my_sleep(double sleeptime
) {
16 DWORD ms
= (DWORD
) (sleeptime
* 1000.0);
23 // Unices version of my_sleep() function
24 static void my_sleep(double sleeptime
) {
26 ts
.tv_sec
= (time_t)sleeptime
;
27 ts
.tv_nsec
= (long)((sleeptime
- (double)ts
.tv_sec
) * 1E9
);