]> granicus.if.org Git - php/commitdiff
make usleep actually work properly
authorWez Furlong <wez@php.net>
Tue, 13 Jan 2004 02:07:04 +0000 (02:07 +0000)
committerWez Furlong <wez@php.net>
Tue, 13 Jan 2004 02:07:04 +0000 (02:07 +0000)
win32/time.c

index 7edc2a5d3af95f02b4e21df4ea348028b06abac3..9a3e004a4d5c404bbf654f05d603160834c58eda 100644 (file)
@@ -136,9 +136,9 @@ void usleep(unsigned int useconds)
        HANDLE timer;
        LARGE_INTEGER due;
 
-       due.QuadPart = -1000 * useconds;
-       timer = CreateWaitableTimer(NULL, TRUE, NULL);
+       due.QuadPart = -(10 * (__int64)useconds);
 
+       timer = CreateWaitableTimer(NULL, TRUE, NULL);
        SetWaitableTimer(timer, &due, 0, NULL, NULL, 0);
        WaitForSingleObject(timer, INFINITE);
        CloseHandle(timer);