Skip to content

Commit 848684f

Browse files
committed
make usleep actually work properly
1 parent 24f5ca6 commit 848684f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

win32/time.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ void usleep(unsigned int useconds)
136136
HANDLE timer;
137137
LARGE_INTEGER due;
138138

139-
due.QuadPart = -1000 * useconds;
140-
timer = CreateWaitableTimer(NULL, TRUE, NULL);
139+
due.QuadPart = -(10 * (__int64)useconds);
141140

141+
timer = CreateWaitableTimer(NULL, TRUE, NULL);
142142
SetWaitableTimer(timer, &due, 0, NULL, NULL, 0);
143143
WaitForSingleObject(timer, INFINITE);
144144
CloseHandle(timer);

0 commit comments

Comments
 (0)