aboutsummaryrefslogtreecommitdiffstats
path: root/include/time.h
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2018-08-10 15:16:30 +0000
committerWarner Losh <imp@FreeBSD.org>2018-08-10 15:16:30 +0000
commit7e299411ac91383d8a28de9fadd2b4ed8a148fff (patch)
treee421e66d68eaf7f17104e054dc7a83b5a1f44c3c /include/time.h
parentf4d5e7d8b534fc331ac4680fe09a3b43fa9a5191 (diff)
downloadsrc-7e299411ac91383d8a28de9fadd2b4ed8a148fff.tar.gz
src-7e299411ac91383d8a28de9fadd2b4ed8a148fff.zip
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
Notes
Notes: svn path=/head/; revision=337576
Diffstat (limited to 'include/time.h')
-rw-r--r--include/time.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/time.h b/include/time.h
index e3c51abeb14c..26e208ffa65b 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 <xlocale/_time.h>
#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_ */