Home | History | Annotate | Download | only in linux
      1 /****************************************************************************
      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
     23 #define _STRUCT_TIMESPEC
     24 struct timespec {
     25   __kernel_time_t tv_sec;
     26   long tv_nsec;
     27 };
     28 #endif
     29 struct timeval {
     30   __kernel_time_t tv_sec;
     31   __kernel_suseconds_t tv_usec;
     32 };
     33 struct timezone {
     34   int tz_minuteswest;
     35   int tz_dsttime;
     36 };
     37 #define ITIMER_REAL 0
     38 #define ITIMER_VIRTUAL 1
     39 #define ITIMER_PROF 2
     40 struct itimerspec {
     41   struct timespec it_interval;
     42   struct timespec it_value;
     43 };
     44 struct itimerval {
     45   struct timeval it_interval;
     46   struct timeval it_value;
     47 };
     48 #ifndef __kernel_timespec
     49 struct __kernel_timespec {
     50   __kernel_time64_t tv_sec;
     51   long long tv_nsec;
     52 };
     53 #endif
     54 #ifndef __kernel_itimerspec
     55 struct __kernel_itimerspec {
     56   struct __kernel_timespec it_interval;
     57   struct __kernel_timespec it_value;
     58 };
     59 #endif
     60 struct __kernel_old_timeval {
     61   __kernel_long_t tv_sec;
     62   __kernel_long_t tv_usec;
     63 };
     64 #define CLOCK_REALTIME 0
     65 #define CLOCK_MONOTONIC 1
     66 #define CLOCK_PROCESS_CPUTIME_ID 2
     67 #define CLOCK_THREAD_CPUTIME_ID 3
     68 #define CLOCK_MONOTONIC_RAW 4
     69 #define CLOCK_REALTIME_COARSE 5
     70 #define CLOCK_MONOTONIC_COARSE 6
     71 #define CLOCK_BOOTTIME 7
     72 #define CLOCK_REALTIME_ALARM 8
     73 #define CLOCK_BOOTTIME_ALARM 9
     74 #define CLOCK_SGI_CYCLE 10
     75 #define CLOCK_TAI 11
     76 #define MAX_CLOCKS 16
     77 #define CLOCKS_MASK (CLOCK_REALTIME | CLOCK_MONOTONIC)
     78 #define CLOCKS_MONO CLOCK_MONOTONIC
     79 #define TIMER_ABSTIME 0x01
     80 #endif
     81