summaryrefslogtreecommitdiff
path: root/win32/time.c
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2003-11-29 22:59:33 +0000
committerWez Furlong <wez@php.net>2003-11-29 22:59:33 +0000
commit7a7713eaeb9ccba3576c599c89bd17c05e978d68 (patch)
tree4d456f85ce17e0385ae92a12da78086de1e05288 /win32/time.c
parentdd60413c6198273c27097567913c0b2c75a7e67c (diff)
downloadphp-git-7a7713eaeb9ccba3576c599c89bd17c05e978d68.tar.gz
Fix build for new usleep implementation.
NB: we now depend on windows 98 and later; windows 95 does not have these timing functions.
Diffstat (limited to 'win32/time.c')
-rw-r--r--win32/time.c7
1 files changed, 6 insertions, 1 deletions
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 <windows.h>
#include <winbase.h>
#include <mmsystem.h>
#include <errno.h>
@@ -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);