Module Name: src
Committed By: rin
Date: Sat Nov 21 09:24:02 UTC 2020
Modified Files:
src/games/warp: util.h
Log Message:
roundsleep(): Too many zeros; tv_nsec should be compared with
500 msec, not 5000. Raised by clang for ILP32 archs.
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/games/warp/util.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/games/warp/util.h
diff -u src/games/warp/util.h:1.6 src/games/warp/util.h:1.7
--- src/games/warp/util.h:1.6 Thu Nov 12 22:23:16 2020
+++ src/games/warp/util.h Sat Nov 21 09:24:02 2020
@@ -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