Source
pub const timeval = switch (native_os) {
.linux => linux.timeval,
.emscripten => emscripten.timeval,
.windows => extern struct {
sec: c_long,
usec: c_long,
},
.macos, .ios, .tvos, .watchos, .visionos => extern struct {
sec: c_long,
usec: i32,
},
// https://github.com/SerenityOS/serenity/blob/6b6eca0631c893c5f8cfb8274cdfe18e2d0637c0/Kernel/API/POSIX/sys/time.h#L15-L18
.dragonfly, .netbsd, .freebsd, .solaris, .illumos, .serenity => extern struct {
/// seconds
sec: time_t,
/// microseconds
usec: suseconds_t,
},
.openbsd => extern struct {
sec: time_t,
usec: c_long,
},
else => void,
}