From 7a7713eaeb9ccba3576c599c89bd17c05e978d68 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sat, 29 Nov 2003 22:59:33 +0000 Subject: [PATCH] Fix build for new usleep implementation. NB: we now depend on windows 98 and later; windows 95 does not have these timing functions. --- win32/time.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/win32/time.c b/win32/time.c index f77dfd2ff8..7edc2a5d3a 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); -- 2.50.1