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.

UTIME

For use with utimensat and futimens.

c.UTIME
pub const UTIME = switch (native_os)

File

lib/std/c.zig:98

Code

pub const UTIME = switch (native_os) {
    .dragonfly, .freebsd, .illumos, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .wasi => struct {
        pub const NOW: timespec = .{ .sec = 0, .nsec = -1 };
        pub const OMIT: timespec = .{ .sec = 0, .nsec = -2 };
    },
    .emscripten => emscripten.UTIME,
    .haiku => struct {
        pub const NOW: timespec = .{ .sec = 0, .nsec = 1000000000 };
        pub const OMIT: timespec = .{ .sec = 0, .nsec = 1000000001 };
    },
    .linux => linux.UTIME,
    .netbsd => struct {
        pub const NOW: timespec = .{ .sec = 0, .nsec = 0x3fffffff };
        pub const OMIT: timespec = .{ .sec = 0, .nsec = 0x3ffffffe };
    },
    .openbsd, .serenity => struct {
        pub const NOW: timespec = .{ .sec = 0, .nsec = -2 };
        pub const OMIT: timespec = .{ .sec = 0, .nsec = -1 };
    },
    else => void,
}