1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 **************************************************************************** 11 ****************************************************************************/ 12 #ifndef _LINUX_TIME_H 13 #define _LINUX_TIME_H 14 15 #include <linux/types.h> 16 17 #ifndef _STRUCT_TIMESPEC 18 #define _STRUCT_TIMESPEC 19 struct timespec { 20 time_t tv_sec; 21 long tv_nsec; 22 }; 23 #endif 24 25 struct timeval { 26 time_t tv_sec; 27 suseconds_t tv_usec; 28 }; 29 30 struct timezone { 31 int tz_minuteswest; 32 int tz_dsttime; 33 }; 34 35 #define NFDBITS __NFDBITS 36 37 #define FD_SETSIZE __FD_SETSIZE 38 #define FD_SET(fd,fdsetp) __FD_SET(fd,fdsetp) 39 #define FD_CLR(fd,fdsetp) __FD_CLR(fd,fdsetp) 40 #define FD_ISSET(fd,fdsetp) __FD_ISSET(fd,fdsetp) 41 #define FD_ZERO(fdsetp) __FD_ZERO(fdsetp) 42 43 #define ITIMER_REAL 0 44 #define ITIMER_VIRTUAL 1 45 #define ITIMER_PROF 2 46 47 struct itimerspec { 48 struct timespec it_interval; 49 struct timespec it_value; 50 }; 51 52 struct itimerval { 53 struct timeval it_interval; 54 struct timeval it_value; 55 }; 56 57 #define CLOCK_REALTIME 0 58 #define CLOCK_MONOTONIC 1 59 #define CLOCK_PROCESS_CPUTIME_ID 2 60 #define CLOCK_THREAD_CPUTIME_ID 3 61 62 #define CLOCK_SGI_CYCLE 10 63 #define MAX_CLOCKS 16 64 #define CLOCKS_MASK (CLOCK_REALTIME | CLOCK_MONOTONIC) 65 #define CLOCKS_MONO CLOCK_MONOTONIC 66 67 #define TIMER_ABSTIME 0x01 68 69 #endif 70