Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

clock_settime

linux.clock_settime
pub fn clock_settime(clk_id: clockid_t, tp: *const timespec) usize

File

lib/std/os/linux.zig:2179

Code

pub fn clock_settime(clk_id: clockid_t, tp: *const timespec) usize {
    return syscall2(
        if (@hasField(SYS, "clock_settime") and native_arch != .hexagon) .clock_settime else .clock_settime64,
        @backingInt(clk_id),
        @intFromPtr(tp),
    );
}