]> git.proxmox.com Git - wasi-libc.git/blame - libc-bottom-half/headers/public/__header_time.h
Delete several blocks of unused code. (#294)
[wasi-libc.git] / libc-bottom-half / headers / public / __header_time.h
CommitLineData
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
446cb3f1 13#include <wasi/api.h>
320054e8 14
446cb3f1 15#define TIMER_ABSTIME __WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME
320054e8
DG
16
17extern const struct __clockid _CLOCK_MONOTONIC;
18#define CLOCK_MONOTONIC (&_CLOCK_MONOTONIC)
320054e8
DG
19extern const struct __clockid _CLOCK_REALTIME;
20#define CLOCK_REALTIME (&_CLOCK_REALTIME)
320054e8 21
51969495
DG
22/*
23 * TIME_UTC is the only standardized time base value.
24 */
25#define TIME_UTC 1
320054e8 26
1bdb356b
DG
27/*
28 * Note that XSI specifies CLOCKS_PER_SEC to be 1000000, rather than
29 * 1000000000; the clock API is providing more precision than XSI specifies.
30 */
31#define CLOCKS_PER_SEC ((clock_t)1000000000)
320054e8
DG
32
33#endif