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