1 /* NB: Include guard matches what <linux/time.h> uses. */
2 #ifndef _STRUCT_TIMESPEC
3 #define _STRUCT_TIMESPEC 1
5 #include <bits/types.h>
6 #include <bits/endian.h>
7 #include <bits/types/time_t.h>
9 /* POSIX.1b structure for a time value. This is like a `struct timeval' but
10 has nanoseconds instead of microseconds. */
13 #ifdef __USE_TIME_BITS64
14 __time64_t tv_sec
; /* Seconds. */
16 __time_t tv_sec
; /* Seconds. */
18 #if __WORDSIZE == 64 \
19 || (defined __SYSCALL_WORDSIZE && __SYSCALL_WORDSIZE == 64) \
20 || (__TIMESIZE == 32 && !defined __USE_TIME_BITS64)
21 __syscall_slong_t tv_nsec
; /* Nanoseconds. */
23 # if __BYTE_ORDER == __BIG_ENDIAN
24 int: 32; /* Padding. */
25 long int tv_nsec
; /* Nanoseconds. */
27 long int tv_nsec
; /* Nanoseconds. */
28 int: 32; /* Padding. */