mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Fix build for new usleep implementation.
NB: we now depend on windows 98 and later; windows 95 does not have these timing functions.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user