diff options
Diffstat (limited to 'include/linux/time.h')
| -rw-r--r-- | include/linux/time.h | 72 |
1 files changed, 1 insertions, 71 deletions
diff --git a/include/linux/time.h b/include/linux/time.h index b51e664c83e7..4d358e9d10f1 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
| @@ -1,33 +1,10 @@ | |||
| 1 | #ifndef _LINUX_TIME_H | 1 | #ifndef _LINUX_TIME_H |
| 2 | #define _LINUX_TIME_H | 2 | #define _LINUX_TIME_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 6 | #ifdef __KERNEL__ | ||
| 7 | # include <linux/cache.h> | 4 | # include <linux/cache.h> |
| 8 | # include <linux/seqlock.h> | 5 | # include <linux/seqlock.h> |
| 9 | # include <linux/math64.h> | 6 | # include <linux/math64.h> |
| 10 | #endif | 7 | #include <uapi/linux/time.h> |
| 11 | |||
| 12 | #ifndef _STRUCT_TIMESPEC | ||
| 13 | #define _STRUCT_TIMESPEC | ||
| 14 | struct timespec { | ||
| 15 | __kernel_time_t tv_sec; /* seconds */ | ||
| 16 | long tv_nsec; /* nanoseconds */ | ||
| 17 | }; | ||
| 18 | #endif | ||
| 19 | |||
| 20 | struct timeval { | ||
| 21 | __kernel_time_t tv_sec; /* seconds */ | ||
| 22 | __kernel_suseconds_t tv_usec; /* microseconds */ | ||
| 23 | }; | ||
| 24 | |||
| 25 | struct timezone { | ||
| 26 | int tz_minuteswest; /* minutes west of Greenwich */ | ||
| 27 | int tz_dsttime; /* type of dst correction */ | ||
| 28 | }; | ||
| 29 | |||
| 30 | #ifdef __KERNEL__ | ||
| 31 | 8 | ||
| 32 | extern struct timezone sys_tz; | 9 | extern struct timezone sys_tz; |
| 33 | 10 | ||
| @@ -280,51 +257,4 @@ static __always_inline void timespec_add_ns(struct timespec *a, u64 ns) | |||
| 280 | a->tv_nsec = ns; | 257 | a->tv_nsec = ns; |
| 281 | } | 258 | } |
| 282 | 259 | ||
| 283 | #endif /* __KERNEL__ */ | ||
| 284 | |||
| 285 | /* | ||
| 286 | * Names of the interval timers, and structure | ||
| 287 | * defining a timer setting: | ||
| 288 | */ | ||
| 289 | #define ITIMER_REAL 0 | ||
| 290 | #define ITIMER_VIRTUAL 1 | ||
| 291 | #define ITIMER_PROF 2 | ||
| 292 | |||
| 293 | struct itimerspec { | ||
| 294 | struct timespec it_interval; /* timer period */ | ||
| 295 | struct timespec it_value; /* timer expiration */ | ||
| 296 | }; | ||
| 297 | |||
| 298 | struct itimerval { | ||
| 299 | struct timeval it_interval; /* timer interval */ | ||
| 300 | struct timeval it_value; /* current value */ | ||
| 301 | }; | ||
| 302 | |||
| 303 | /* | ||
| 304 | * The IDs of the various system clocks (for POSIX.1b interval timers): | ||
| 305 | */ | ||
| 306 | #define CLOCK_REALTIME 0 | ||
| 307 | #define CLOCK_MONOTONIC 1 | ||
| 308 | #define CLOCK_PROCESS_CPUTIME_ID 2 | ||
| 309 | #define CLOCK_THREAD_CPUTIME_ID 3 | ||
| 310 | #define CLOCK_MONOTONIC_RAW 4 | ||
| 311 | #define CLOCK_REALTIME_COARSE 5 | ||
| 312 | #define CLOCK_MONOTONIC_COARSE 6 | ||
| 313 | #define CLOCK_BOOTTIME 7 | ||
| 314 | #define CLOCK_REALTIME_ALARM 8 | ||
| 315 | #define CLOCK_BOOTTIME_ALARM 9 | ||
| 316 | |||
| 317 | /* | ||
| 318 | * The IDs of various hardware clocks: | ||
| 319 | */ | ||
| 320 | #define CLOCK_SGI_CYCLE 10 | ||
| 321 | #define MAX_CLOCKS 16 | ||
| 322 | #define CLOCKS_MASK (CLOCK_REALTIME | CLOCK_MONOTONIC) | ||
| 323 | #define CLOCKS_MONO CLOCK_MONOTONIC | ||
| 324 | |||
| 325 | /* | ||
| 326 | * The various flags for setting POSIX.1b interval timers: | ||
| 327 | */ | ||
| 328 | #define TIMER_ABSTIME 0x01 | ||
| 329 | |||
| 330 | #endif | 260 | #endif |
