roundsleep(): Too many zeros; tv_nsec should be compared with

500 msec, not 5000. Raised by clang for ILP32 archs.
This commit is contained in:
rin 2020-11-21 09:24:02 +00:00
parent 6adf3573af
commit f52e729971

View 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