diff --git a/win32/time.c b/win32/time.c index f77dfd2ff8f..7edc2a5d3af 100644 --- a/win32/time.c +++ b/win32/time.c @@ -22,9 +22,14 @@ /* Include stuff ************************************************************ */ +/* this allows the use of the WaitableTimer functions. + * For win98 and later */ +#define _WIN32_WINNT 0x400 + #include "time.h" #include "unistd.h" #include "signal.h" +#include #include #include #include @@ -131,7 +136,7 @@ void usleep(unsigned int useconds) HANDLE timer; LARGE_INTEGER due; - due.QuadPart = -useconds * 1000; + due.QuadPart = -1000 * useconds; timer = CreateWaitableTimer(NULL, TRUE, NULL); SetWaitableTimer(timer, &due, 0, NULL, NULL, 0);