From 7e299411ac91383d8a28de9fadd2b4ed8a148fff Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Fri, 10 Aug 2018 15:16:30 +0000 Subject: Bring in timespce_get form NetBSD. Bring in the functionality for timespec_get from NetBSD. I've lightly edited the .c file to remove _DIAGASSERT because FreeBSD doesn't have that functionality and the typical #define'ing it to assert isn't right here. The man page is verbatim from NetBSD, but will be revised as part of a larger cleanup of the time man pages (they are inconsistent and vague in all the wrong places). Differential Review: https://reviews.freebsd.org/D16649 --- include/time.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/time.h b/include/time.h index e3c51abeb14c2..26e208ffa65b6 100644 --- a/include/time.h +++ b/include/time.h @@ -206,6 +206,11 @@ time_t posix2time(time_t t); #if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) #include #endif + +/* ISO/IEC 9899:201x 7.27.2.5 The timespec_get function */ +#define TIME_UTC 1 /* time elapsed since epoch */ +int timespec_get(struct timespec *ts, int base); + __END_DECLS #endif /* !_TIME_H_ */ -- cgit v1.3