timespec_newer(): time a should be > or >= to b

Time comparision should be >= not just >.  May seem a bit silly to
nitpick like this since we're comparing nano seconds, but on systems
with no high-res timers this happens more often than you would like.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2017-10-24 16:04:18 +02:00
parent 6b2678c2ed
commit b45c3d5cb8
+1 -1
View File
@@ -34,7 +34,7 @@ static inline int timespec_newer(const struct timespec *a,
if (a->tv_sec != b->tv_sec)
return a->tv_sec > b->tv_sec;
return a->tv_nsec > b->tv_nsec;
return a->tv_nsec >= b->tv_nsec;
}
const char *condstr(enum cond_state s)