Fix sleep delay for the non-threaded Windows RTS
authorSimon Marlow <simonmar@microsoft.com>
Tue, 20 Feb 2007 09:07:16 +0000 (09:07 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Tue, 20 Feb 2007 09:07:16 +0000 (09:07 +0000)
This is the Windows counterpart to "Make the non-threaded-RTS
threadDelay wait at least as long as asked"

rts/win32/IOManager.c

index 764be69..6af4245 100644 (file)
@@ -190,7 +190,7 @@ IOWorkerProc(PVOID param)
                     * 
                     * Note: Sleep() is in milliseconds, not micros.
                     */
-                   Sleep(work->workData.delayData.msecs / 1000);
+                   Sleep((work->workData.delayData.msecs + 999) / 1000);
                    len = work->workData.delayData.msecs;
                    complData = NULL;
                    fd = 0;