logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

time.h (1752B)


  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. #ifndef _LINUX_TIME_H
  3. #define _LINUX_TIME_H
  4. #include <linux/types.h>
  5. #include <linux/time_types.h>
  6. #ifndef _STRUCT_TIMESPEC
  7. #define _STRUCT_TIMESPEC
  8. struct timespec {
  9. __kernel_old_time_t tv_sec; /* seconds */
  10. long tv_nsec; /* nanoseconds */
  11. };
  12. #endif
  13. struct timeval {
  14. __kernel_old_time_t tv_sec; /* seconds */
  15. __kernel_suseconds_t tv_usec; /* microseconds */
  16. };
  17. struct itimerspec {
  18. struct timespec it_interval;/* timer period */
  19. struct timespec it_value; /* timer expiration */
  20. };
  21. struct itimerval {
  22. struct timeval it_interval;/* timer interval */
  23. struct timeval it_value; /* current value */
  24. };
  25. struct timezone {
  26. int tz_minuteswest; /* minutes west of Greenwich */
  27. int tz_dsttime; /* type of dst correction */
  28. };
  29. /*
  30. * Names of the interval timers, and structure
  31. * defining a timer setting:
  32. */
  33. #define ITIMER_REAL 0
  34. #define ITIMER_VIRTUAL 1
  35. #define ITIMER_PROF 2
  36. /*
  37. * The IDs of the various system clocks (for POSIX.1b interval timers):
  38. */
  39. #define CLOCK_REALTIME 0
  40. #define CLOCK_MONOTONIC 1
  41. #define CLOCK_PROCESS_CPUTIME_ID 2
  42. #define CLOCK_THREAD_CPUTIME_ID 3
  43. #define CLOCK_MONOTONIC_RAW 4
  44. #define CLOCK_REALTIME_COARSE 5
  45. #define CLOCK_MONOTONIC_COARSE 6
  46. #define CLOCK_BOOTTIME 7
  47. #define CLOCK_REALTIME_ALARM 8
  48. #define CLOCK_BOOTTIME_ALARM 9
  49. /*
  50. * The driver implementing this got removed. The clock ID is kept as a
  51. * place holder. Do not reuse!
  52. */
  53. #define CLOCK_SGI_CYCLE 10
  54. #define CLOCK_TAI 11
  55. #define MAX_CLOCKS 16
  56. #define CLOCKS_MASK (CLOCK_REALTIME | CLOCK_MONOTONIC)
  57. #define CLOCKS_MONO CLOCK_MONOTONIC
  58. /*
  59. * The various flags for setting POSIX.1b interval timers:
  60. */
  61. #define TIMER_ABSTIME 0x01
  62. #endif /* _LINUX_TIME_H */