summaryrefslogtreecommitdiff
path: root/include/sys/time.h
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2001-02-15 16:15:30 +0000
committerManuel Novoa III <mjn3@codepoet.org>2001-02-15 16:15:30 +0000
commit3e0fe4b1cc36f17626860176c1450bb0b31ca5cd (patch)
tree16f88c413d131248208d112bc2f870a8a66b42da /include/sys/time.h
parentbd0ff62e4a6f434708d6fb3b1258dc5226a40595 (diff)
Handle definition of struct timespec.
Diffstat (limited to 'include/sys/time.h')
-rw-r--r--include/sys/time.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/sys/time.h b/include/sys/time.h
index 83be23fb4..f6fecc735 100644
--- a/include/sys/time.h
+++ b/include/sys/time.h
@@ -22,6 +22,17 @@
#include <features.h>
#include <time.h>
+
+#if defined __USE_MISC || defined __USE_GNU
+/* POSIX.4 structure for a time value. This is like a `struct timeval' but
+ has nanoseconds instead of microseconds. */
+struct timespec
+ {
+ long int tv_sec; /* Seconds. */
+ long int tv_nsec; /* Nanoseconds. */
+ };
+#endif
+
#include <sys/select.h>
#define __need_timeval