1#ifndef _KERNEL_LIBKERN_BITS_TIME_H
2#define _KERNEL_LIBKERN_BITS_TIME_H
3
4#include <libkern/types.h>
5
6struct timeval {
7 time_t tv_sec;
8 uint32_t tv_usec;
9};
10typedef struct timeval timeval_t;
11
12#define DST_NONE 0 /* not on dst */
13#define DST_USA 1 /* USA style dst */
14#define DST_AUST 2 /* Australian style dst */
15#define DST_WET 3 /* Western European dst */
16#define DST_MET 4 /* Middle European dst */
17#define DST_EET 5 /* Eastern European dst */
18#define DST_CAN 6 /* Canada */
19struct timezone {
20 int tz_minuteswest; /* minutes west of Greenwich */
21 int tz_dsttime; /* type of dst correction */
22};
23typedef struct timezone timezone_t;
24
25struct timespec {
26 time_t tv_sec;
27 uint32_t tv_nsec;
28};
29typedef struct timespec timespec_t;
30
31struct tm {
32 int tm_sec;
33 int tm_min;
34 int tm_hour;
35 int tm_mday;
36 int tm_mon;
37 int tm_year;
38 int tm_wday;
39 int tm_yday;
40 int tm_isdst;
41};
42typedef struct tm tm_t;
43
44typedef enum {
45 CLOCK_REALTIME,
46 CLOCK_MONOTONIC,
47 CLOCK_PROCESS_CPUTIME_ID,
48 CLOCK_THREAD_CPUTIME_ID,
49} clockid_t;
50
51#endif // _KERNEL_LIBKERN_BITS_TIME_H