Add TIMESPEC_OVERFLOW helper

Add the TIMESPEC_OVERFLOW helper macro to allow easy checking
of timespec overflow.
This commit is contained in:
Brian Behlendorf 2011-03-01 15:21:38 -08:00
parent 19c1eb829d
commit a4a1e1ecb4

View File

@ -82,4 +82,7 @@ gethrestime_sec(void)
return now.tv_sec;
}
#define TIMESPEC_OVERFLOW(ts) \
((ts)->tv_sec < TIME32_MIN || (ts)->tv_sec > TIME32_MAX)
#endif /* _SPL_TIME_H */