OSDN Git Service

2009-07-18 Jeff Lu <jll544@yahoo.com>
authorironhead <ironhead>
Sat, 18 Jul 2009 14:41:22 +0000 (14:41 +0000)
committerironhead <ironhead>
Sat, 18 Jul 2009 14:41:22 +0000 (14:41 +0000)
        * mingwex/usleep.c: round up to next ms

winsup/mingw/ChangeLog
winsup/mingw/mingwex/usleep.c

index d5313bc..50c4263 100644 (file)
@@ -1,3 +1,7 @@
+2009-07-18 Jeff Lu  <jll544@yahoo.com>
+
+       * mingwex/usleep.c: round up to next ms
+
 2009-07-17  Chris Sutcliffe  <ir0nh34d@users.sourceforge.net>
 
        * mingwex/math/cephes_mconf.h mingwex/math/erfl.c mingwex/math/lgamma.c
index b322a77..c059c06 100755 (executable)
@@ -34,7 +34,7 @@ int __cdecl usleep(useconds_t useconds)
     if(useconds >= 1000000)
         return EINVAL;
 
-    Sleep(useconds / 1000);
+    Sleep((useconds + 999) / 1000);
 
     return 0;
 }