mirror of
https://github.com/ziglang/zig.git
synced 2026-02-14 13:30:45 +00:00
wasi: import clock and timestamp function/types
This commit is contained in:
parent
1fabd6bbf3
commit
0ce05fa621
@ -1,18 +1,28 @@
|
||||
pub const clockid_t = u32;
|
||||
pub const errno_t = u16;
|
||||
pub const exitcode_t = u32;
|
||||
pub const fd_t = u32;
|
||||
pub const signal_t = u8;
|
||||
pub const timestamp_t = u64;
|
||||
|
||||
pub const ciovec_t = extern struct {
|
||||
buf: [*]const u8,
|
||||
buf_len: usize,
|
||||
};
|
||||
|
||||
pub const CLOCK_REALTIME = 0;
|
||||
pub const CLOCK_MONOTONIC = 1;
|
||||
pub const CLOCK_PROCESS_CPUTIME_ID = 2;
|
||||
pub const CLOCK_THREAD_CPUTIME_ID = 3;
|
||||
|
||||
pub const SIGABRT: signal_t = 6;
|
||||
|
||||
pub extern "wasi_unstable" fn args_get(argv: [*][*]u8, argv_buf: [*]u8) errno_t;
|
||||
pub extern "wasi_unstable" fn args_sizes_get(argc: *usize, argv_buf_size: *usize) errno_t;
|
||||
|
||||
pub extern "wasi_unstable" fn clock_res_get(clock_id: clockid_t, resolution: *timestamp_t) errno_t;
|
||||
pub extern "wasi_unstable" fn clock_time_get(clock_id: clockid_t, precision: timestamp_t, timestamp: *timestamp_t) errno_t;
|
||||
|
||||
pub extern "wasi_unstable" fn environ_get(environ: [*]?[*]u8, environ_buf: [*]u8) errno_t;
|
||||
pub extern "wasi_unstable" fn environ_sizes_get(environ_count: *usize, environ_buf_size: *usize) errno_t;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user