blob: a10e5860578ec2c7ce850923584ea4cb798c6c83 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Ben Cheng655a7c02013-10-16 16:09:24 -07007#ifndef _UAPI_LINUX_TIME_H
8#define _UAPI_LINUX_TIME_H
Elliott Hughes875d4052023-03-20 15:07:16 +00009#include <bits/timespec.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070010#include <linux/types.h>
Christopher Ferris24f97eb2019-05-20 12:58:13 -070011#include <linux/time_types.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070012#ifndef _STRUCT_TIMESPEC
Ben Cheng655a7c02013-10-16 16:09:24 -070013#define _STRUCT_TIMESPEC
Ben Cheng655a7c02013-10-16 16:09:24 -070014#endif
15struct timeval {
Christopher Ferrisd32ca142020-02-04 16:16:51 -080016 __kernel_old_time_t tv_sec;
Tao Baod7db5942015-01-28 10:07:51 -080017 __kernel_suseconds_t tv_usec;
Ben Cheng655a7c02013-10-16 16:09:24 -070018};
Ben Cheng655a7c02013-10-16 16:09:24 -070019struct itimerspec {
Tao Baod7db5942015-01-28 10:07:51 -080020 struct timespec it_interval;
21 struct timespec it_value;
Ben Cheng655a7c02013-10-16 16:09:24 -070022};
23struct itimerval {
Tao Baod7db5942015-01-28 10:07:51 -080024 struct timeval it_interval;
25 struct timeval it_value;
Ben Cheng655a7c02013-10-16 16:09:24 -070026};
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -070027struct timezone {
28 int tz_minuteswest;
29 int tz_dsttime;
30};
31#define ITIMER_REAL 0
32#define ITIMER_VIRTUAL 1
33#define ITIMER_PROF 2
Ben Cheng655a7c02013-10-16 16:09:24 -070034#define CLOCK_REALTIME 0
35#define CLOCK_MONOTONIC 1
36#define CLOCK_PROCESS_CPUTIME_ID 2
Ben Cheng655a7c02013-10-16 16:09:24 -070037#define CLOCK_THREAD_CPUTIME_ID 3
38#define CLOCK_MONOTONIC_RAW 4
39#define CLOCK_REALTIME_COARSE 5
40#define CLOCK_MONOTONIC_COARSE 6
Ben Cheng655a7c02013-10-16 16:09:24 -070041#define CLOCK_BOOTTIME 7
42#define CLOCK_REALTIME_ALARM 8
43#define CLOCK_BOOTTIME_ALARM 9
44#define CLOCK_SGI_CYCLE 10
Ben Cheng655a7c02013-10-16 16:09:24 -070045#define CLOCK_TAI 11
46#define MAX_CLOCKS 16
47#define CLOCKS_MASK (CLOCK_REALTIME | CLOCK_MONOTONIC)
48#define CLOCKS_MONO CLOCK_MONOTONIC
Ben Cheng655a7c02013-10-16 16:09:24 -070049#define TIMER_ABSTIME 0x01
50#endif