blob: 59e3160eb0a5c40c20daea3c8a76ab4900b1bf64 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
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 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI_LINUX_TIME_H
20#define _UAPI_LINUX_TIME_H
21#include <linux/types.h>
22#ifndef _STRUCT_TIMESPEC
Ben Cheng655a7c02013-10-16 16:09:24 -070023#define _STRUCT_TIMESPEC
24struct timespec {
Tao Baod7db5942015-01-28 10:07:51 -080025 __kernel_time_t tv_sec;
26 long tv_nsec;
Ben Cheng655a7c02013-10-16 16:09:24 -070027};
28#endif
29struct timeval {
Tao Baod7db5942015-01-28 10:07:51 -080030 __kernel_time_t tv_sec;
Tao Baod7db5942015-01-28 10:07:51 -080031 __kernel_suseconds_t tv_usec;
Ben Cheng655a7c02013-10-16 16:09:24 -070032};
33struct timezone {
Tao Baod7db5942015-01-28 10:07:51 -080034 int tz_minuteswest;
Tao Baod7db5942015-01-28 10:07:51 -080035 int tz_dsttime;
Ben Cheng655a7c02013-10-16 16:09:24 -070036};
37#define ITIMER_REAL 0
38#define ITIMER_VIRTUAL 1
Ben Cheng655a7c02013-10-16 16:09:24 -070039#define ITIMER_PROF 2
40struct itimerspec {
Tao Baod7db5942015-01-28 10:07:51 -080041 struct timespec it_interval;
42 struct timespec it_value;
Ben Cheng655a7c02013-10-16 16:09:24 -070043};
44struct itimerval {
Tao Baod7db5942015-01-28 10:07:51 -080045 struct timeval it_interval;
46 struct timeval it_value;
Ben Cheng655a7c02013-10-16 16:09:24 -070047};
48#define CLOCK_REALTIME 0
49#define CLOCK_MONOTONIC 1
50#define CLOCK_PROCESS_CPUTIME_ID 2
Ben Cheng655a7c02013-10-16 16:09:24 -070051#define CLOCK_THREAD_CPUTIME_ID 3
52#define CLOCK_MONOTONIC_RAW 4
53#define CLOCK_REALTIME_COARSE 5
54#define CLOCK_MONOTONIC_COARSE 6
Ben Cheng655a7c02013-10-16 16:09:24 -070055#define CLOCK_BOOTTIME 7
56#define CLOCK_REALTIME_ALARM 8
57#define CLOCK_BOOTTIME_ALARM 9
58#define CLOCK_SGI_CYCLE 10
Ben Cheng655a7c02013-10-16 16:09:24 -070059#define CLOCK_TAI 11
60#define MAX_CLOCKS 16
61#define CLOCKS_MASK (CLOCK_REALTIME | CLOCK_MONOTONIC)
62#define CLOCKS_MONO CLOCK_MONOTONIC
Ben Cheng655a7c02013-10-16 16:09:24 -070063#define TIMER_ABSTIME 0x01
64#endif