1use libc::{c_int, time_t, timespec, timeval, timezone};
10
11#[no_mangle]
13pub unsafe extern "C" fn gettimeofday(tv: *mut timeval, tz: *mut timezone) -> c_int {
14 libc::syscall(libc::SYS_gettimeofday, tv, tz) as c_int
15}
16
17#[no_mangle]
19pub unsafe extern "C" fn clock_getres(clk_id: c_int, tp: *mut timespec) -> c_int {
20 libc::syscall(libc::SYS_clock_getres, clk_id, tp) as c_int
21}
22
23#[no_mangle]
25pub unsafe extern "C" fn clock_gettime(clk_id: c_int, tp: *mut timespec) -> c_int {
26 libc::syscall(libc::SYS_clock_gettime, clk_id, tp) as c_int
27}
28
29#[no_mangle]
31pub unsafe extern "C" fn time(tloc: *mut time_t) -> time_t {
32 libc::syscall(libc::SYS_time, tloc) as time_t
33}