mirror of
https://github.com/troglobit/finit.git
synced 2026-10-13 10:14:47 +00:00
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:
+1
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user