zig/lib/libc/include/wasm-wasi-musl/__header_time.h
Jakub Konka 7b74de7d71 wasi,cc: fix naming and add stubs for building
Rename include dir to match the convention:
  from `wasm32-wasi` to `wasm-wasi-musl`

Add building stubs which will be used to build and cache WASI
libc sysroot.
2021-05-20 16:54:00 +02:00

37 lines
1 KiB
C
Vendored

#ifndef __wasilibc___header_time_h
#define __wasilibc___header_time_h
#define __need_size_t
#define __need_NULL
#include <stddef.h>
#include <__typedef_time_t.h>
#include <__struct_timespec.h>
#include <__struct_tm.h>
#include <__typedef_clockid_t.h>
#include <wasi/api.h>
#define TIMER_ABSTIME __WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME
extern const struct __clockid _CLOCK_MONOTONIC;
#define CLOCK_MONOTONIC (&_CLOCK_MONOTONIC)
extern const struct __clockid _CLOCK_PROCESS_CPUTIME_ID;
#define CLOCK_PROCESS_CPUTIME_ID (&_CLOCK_PROCESS_CPUTIME_ID)
extern const struct __clockid _CLOCK_REALTIME;
#define CLOCK_REALTIME (&_CLOCK_REALTIME)
extern const struct __clockid _CLOCK_THREAD_CPUTIME_ID;
#define CLOCK_THREAD_CPUTIME_ID (&_CLOCK_THREAD_CPUTIME_ID)
/*
* TIME_UTC is the only standardized time base value.
*/
#define TIME_UTC 1
/*
* Note that XSI specifies CLOCKS_PER_SEC to be 1000000, rather than
* 1000000000; the clock API is providing more precision than XSI specifies.
*/
#define CLOCKS_PER_SEC ((clock_t)1000000000)
#endif