summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrin <rin@NetBSD.org>2020-11-21 09:24:02 +0000
committerrin <rin@NetBSD.org>2020-11-21 09:24:02 +0000
commit6f7d88f56398d70fe966b67050293c3860ae53d2 (patch)
tree8d227941e12f79272c29d84b6daea224c01b5d6d
parentda6a856c31649c6fc011d45d51542876e1b13539 (diff)
downloadbsdgames-darwin-6f7d88f56398d70fe966b67050293c3860ae53d2.tar.gz
bsdgames-darwin-6f7d88f56398d70fe966b67050293c3860ae53d2.tar.zst
bsdgames-darwin-6f7d88f56398d70fe966b67050293c3860ae53d2.zip
roundsleep(): Too many zeros; tv_nsec should be compared with
500 msec, not 5000. Raised by clang for ILP32 archs.
-rw-r--r--warp/util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/warp/util.h b/warp/util.h
index ba7dbe3d..454e8f5a 100644
--- a/warp/util.h
+++ b/warp/util.h
@@ -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