4 #include <linux/types.h>
7 #ifndef _STRUCT_TIMESPEC
8 #define _STRUCT_TIMESPEC
10 time_t tv_sec; /* seconds */
11 long tv_nsec; /* nanoseconds */
16 time_t tv_sec; /* seconds */
17 suseconds_t tv_usec; /* microseconds */
21 int tz_minuteswest; /* minutes west of Greenwich */
22 int tz_dsttime; /* type of dst correction */
26 #define NFDBITS __NFDBITS
28 #define FD_SETSIZE __FD_SETSIZE
29 #define FD_SET(fd,fdsetp) __FD_SET(fd,fdsetp)
30 #define FD_CLR(fd,fdsetp) __FD_CLR(fd,fdsetp)
31 #define FD_ISSET(fd,fdsetp) __FD_ISSET(fd,fdsetp)
32 #define FD_ZERO(fdsetp) __FD_ZERO(fdsetp)
35 * Names of the interval timers, and structure
36 * defining a timer setting:
39 #define ITIMER_VIRTUAL 1
43 struct timespec it_interval; /* timer period */
44 struct timespec it_value; /* timer expiration */
48 struct timeval it_interval; /* timer interval */
49 struct timeval it_value; /* current value */
53 * The IDs of the various system clocks (for POSIX.1b interval timers):
55 #define CLOCK_REALTIME 0
56 #define CLOCK_MONOTONIC 1
57 #define CLOCK_PROCESS_CPUTIME_ID 2
58 #define CLOCK_THREAD_CPUTIME_ID 3
61 * The IDs of various hardware clocks:
63 #define CLOCK_SGI_CYCLE 10
65 #define CLOCKS_MASK (CLOCK_REALTIME | CLOCK_MONOTONIC)
66 #define CLOCKS_MONO CLOCK_MONOTONIC
69 * The various flags for setting POSIX.1b interval timers:
71 #define TIMER_ABSTIME 0x01