| ... | ... | @@ -1456,6 +1456,16 @@ pub fn clock_settime(clk_id: i32, tp: *const timespec) usize { |
| 1456 | 1456 | return syscall2(.clock_settime, @as(usize, @bitCast(@as(isize, clk_id))), @intFromPtr(tp)); |
| 1457 | 1457 | } |
| 1458 | 1458 | |
| 1459 | pub fn clock_nanosleep(clockid: clockid_t, flags: TIMER, request: *const timespec, remain: ?*timespec) usize { |
| 1460 | return syscall4( |
| 1461 | .clock_nanosleep, |
| 1462 | @intFromEnum(clockid), |
| 1463 | @as(u32, @bitCast(flags)), |
| 1464 | @intFromPtr(request), |
| 1465 | @intFromPtr(remain), |
| 1466 | ); |
| 1467 | } |
| 1468 | |
| 1459 | 1469 | pub fn gettimeofday(tv: ?*timeval, tz: ?*timezone) usize { |
| 1460 | 1470 | return syscall2(.gettimeofday, @intFromPtr(tv), @intFromPtr(tz)); |
| 1461 | 1471 | } |
| ... | ... | @@ -4527,6 +4537,11 @@ pub const clockid_t = enum(u32) { |
| 4527 | 4537 | _, |
| 4528 | 4538 | }; |
| 4529 | 4539 | |
| 4540 | pub const TIMER = packed struct(u32) { |
| 4541 | ABSTIME: bool, |
| 4542 | _: u31 = 0, |
| 4543 | }; |
| 4544 | |
| 4530 | 4545 | pub const CSIGNAL = 0x000000ff; |
| 4531 | 4546 | |
| 4532 | 4547 | pub const CLONE = struct { |