1 /* 2 * This header was generated from the Linux kernel headers by update_headers.py, 3 * to provide necessary information from kernel to userspace, such as constants, 4 * structures, and macros, and thus, contains no copyrightable information. 5 */ 6 #ifndef _UAPI_LINUX_TIME_H 7 #define _UAPI_LINUX_TIME_H 8 #include <linux/types.h> 9 #ifndef _STRUCT_TIMESPEC 10 #define _STRUCT_TIMESPEC 11 struct timespec { 12 __kernel_time_t tv_sec; 13 long tv_nsec; 14 }; 15 #endif 16 struct timeval { 17 __kernel_time_t tv_sec; 18 __kernel_suseconds_t tv_usec; 19 }; 20 struct timezone { 21 int tz_minuteswest; 22 int tz_dsttime; 23 }; 24 #define ITIMER_REAL 0 25 #define ITIMER_VIRTUAL 1 26 #define ITIMER_PROF 2 27 struct itimerspec { 28 struct timespec it_interval; 29 struct timespec it_value; 30 }; 31 struct itimerval { 32 struct timeval it_interval; 33 struct timeval it_value; 34 }; 35 #ifndef __kernel_timespec 36 struct __kernel_timespec { 37 __kernel_time64_t tv_sec; 38 long long tv_nsec; 39 }; 40 #endif 41 #ifndef __kernel_itimerspec 42 struct __kernel_itimerspec { 43 struct __kernel_timespec it_interval; 44 struct __kernel_timespec it_value; 45 }; 46 #endif 47 struct __kernel_old_timeval { 48 __kernel_long_t tv_sec; 49 __kernel_long_t tv_usec; 50 }; 51 #define CLOCK_REALTIME 0 52 #define CLOCK_MONOTONIC 1 53 #define CLOCK_PROCESS_CPUTIME_ID 2 54 #define CLOCK_THREAD_CPUTIME_ID 3 55 #define CLOCK_MONOTONIC_RAW 4 56 #define CLOCK_REALTIME_COARSE 5 57 #define CLOCK_MONOTONIC_COARSE 6 58 #define CLOCK_BOOTTIME 7 59 #define CLOCK_REALTIME_ALARM 8 60 #define CLOCK_BOOTTIME_ALARM 9 61 #define CLOCK_SGI_CYCLE 10 62 #define CLOCK_TAI 11 63 #define MAX_CLOCKS 16 64 #define CLOCKS_MASK (CLOCK_REALTIME | CLOCK_MONOTONIC) 65 #define CLOCKS_MONO CLOCK_MONOTONIC 66 #define TIMER_ABSTIME 0x01 67 #endif 68