mirror of
https://github.com/troglobit/finit.git
synced 2026-10-21 11:29:42 +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 parent
6b2678c2ed
commit
b45c3d5cb8
1 file changed
+1
-1
+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