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