0001
0002 #ifndef _UAPI_LINUX_TIME_H
0003 #define _UAPI_LINUX_TIME_H
0004
0005 #include <linux/types.h>
0006 #include <linux/time_types.h>
0007
0008 #ifndef __KERNEL__
0009 #ifndef _STRUCT_TIMESPEC
0010 #define _STRUCT_TIMESPEC
0011 struct timespec {
0012 __kernel_old_time_t tv_sec;
0013 long tv_nsec;
0014 };
0015 #endif
0016
0017 struct timeval {
0018 __kernel_old_time_t tv_sec;
0019 __kernel_suseconds_t tv_usec;
0020 };
0021
0022 struct itimerspec {
0023 struct timespec it_interval;
0024 struct timespec it_value;
0025 };
0026
0027 struct itimerval {
0028 struct timeval it_interval;
0029 struct timeval it_value;
0030 };
0031 #endif
0032
0033 struct timezone {
0034 int tz_minuteswest;
0035 int tz_dsttime;
0036 };
0037
0038
0039
0040
0041
0042 #define ITIMER_REAL 0
0043 #define ITIMER_VIRTUAL 1
0044 #define ITIMER_PROF 2
0045
0046
0047
0048
0049 #define CLOCK_REALTIME 0
0050 #define CLOCK_MONOTONIC 1
0051 #define CLOCK_PROCESS_CPUTIME_ID 2
0052 #define CLOCK_THREAD_CPUTIME_ID 3
0053 #define CLOCK_MONOTONIC_RAW 4
0054 #define CLOCK_REALTIME_COARSE 5
0055 #define CLOCK_MONOTONIC_COARSE 6
0056 #define CLOCK_BOOTTIME 7
0057 #define CLOCK_REALTIME_ALARM 8
0058 #define CLOCK_BOOTTIME_ALARM 9
0059
0060
0061
0062
0063 #define CLOCK_SGI_CYCLE 10
0064 #define CLOCK_TAI 11
0065
0066 #define MAX_CLOCKS 16
0067 #define CLOCKS_MASK (CLOCK_REALTIME | CLOCK_MONOTONIC)
0068 #define CLOCKS_MONO CLOCK_MONOTONIC
0069
0070
0071
0072
0073 #define TIMER_ABSTIME 0x01
0074
0075 #endif