Skip to content

Commit 27861e9

Browse files
committed
Supply timespecsub if needed.
1 parent 7c0e662 commit 27861e9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

defines.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,13 @@ struct winsize {
515515
} while (0)
516516
#endif
517517

518+
#ifndef timespeccmp
519+
#define timespeccmp(tsp, usp, cmp) \
520+
(((tsp)->tv_sec == (usp)->tv_sec) ? \
521+
((tsp)->tv_nsec cmp (usp)->tv_nsec) : \
522+
((tsp)->tv_sec cmp (usp)->tv_sec))
523+
#endif
524+
518525
#ifndef TIMEVAL_TO_TIMESPEC
519526
#define TIMEVAL_TO_TIMESPEC(tv, ts) { \
520527
(ts)->tv_sec = (tv)->tv_sec; \

0 commit comments

Comments
 (0)