Add TIMESPEC_OVERFLOW helper
Add the TIMESPEC_OVERFLOW helper macro to allow easy checking of timespec overflow.
This commit is contained in:
parent
19c1eb829d
commit
a4a1e1ecb4
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue