]>
Commit | Line | Data |
---|---|---|
320054e8 DG |
1 | #ifndef __wasilibc___header_time_h |
2 | #define __wasilibc___header_time_h | |
3 | ||
4 | #define __need_size_t | |
5 | #define __need_NULL | |
6 | #include <stddef.h> | |
7 | ||
8 | #include <__typedef_time_t.h> | |
9 | #include <__struct_timespec.h> | |
10 | #include <__struct_tm.h> | |
11 | #include <__typedef_clockid_t.h> | |
12 | ||
13 | #include <wasi/core.h> | |
14 | ||
15 | #define TIMER_ABSTIME __WASI_SUBSCRIPTION_CLOCK_ABSTIME | |
16 | ||
17 | extern const struct __clockid _CLOCK_MONOTONIC; | |
18 | #define CLOCK_MONOTONIC (&_CLOCK_MONOTONIC) | |
19 | extern const struct __clockid _CLOCK_PROCESS_CPUTIME_ID; | |
20 | #define CLOCK_PROCESS_CPUTIME_ID (&_CLOCK_PROCESS_CPUTIME_ID) | |
21 | extern const struct __clockid _CLOCK_REALTIME; | |
22 | #define CLOCK_REALTIME (&_CLOCK_REALTIME) | |
23 | extern const struct __clockid _CLOCK_THREAD_CPUTIME_ID; | |
24 | #define CLOCK_THREAD_CPUTIME_ID (&_CLOCK_THREAD_CPUTIME_ID) | |
25 | ||
26 | #define TIME_UTC __WASI_CLOCK_REALTIME | |
27 | ||
28 | /* FIXME: POSIX requires this to be 1000000, and that's what glibc and musl use. */ | |
29 | #define CLOCKS_PER_SEC (1000000000) | |
30 | ||
31 | #endif |