]> git.cameronkatri.com Git - bsdgames-darwin.git/commitdiff
roundsleep(): Too many zeros; tv_nsec should be compared with
authorrin <rin@NetBSD.org>
Sat, 21 Nov 2020 09:24:02 +0000 (09:24 +0000)
committerrin <rin@NetBSD.org>
Sat, 21 Nov 2020 09:24:02 +0000 (09:24 +0000)
500 msec, not 5000. Raised by clang for ILP32 archs.

warp/util.h

index ba7dbe3d352a3d81e5000abde3a98faac7c44de3..454e8f5af417d3dcc890c64b09df60b2fc0e55c3 100644 (file)
@@ -18,7 +18,7 @@
     /* we get fractions of seconds from calling ftime on timebuf */
 
 extern struct timespec timebuf;
-#define roundsleep(x) (clock_gettime(CLOCK_REALTIME, &timebuf),sleep(timebuf.tv_nsec > 5000000000 ?x+1:x))
+#define roundsleep(x) (clock_gettime(CLOCK_REALTIME, &timebuf),sleep(timebuf.tv_nsec > (500 * 1000 * 1000) ?x+1:x))
 
 #define waiting 0