use crate::{backend, io};
pub use backend::time::types::{Nsecs, Secs, Timespec};
#[cfg(not(target_os = "wasi"))]
pub use backend::time::types::{ClockId, DynamicClockId};
#[cfg(any(not(any(target_os = "redox", target_os = "wasi"))))]
#[inline]
#[must_use]
pub fn clock_getres(id: ClockId) -> Timespec {
backend::time::syscalls::clock_getres(id)
}
#[cfg(not(target_os = "wasi"))]
#[inline]
#[must_use]
pub fn clock_gettime(id: ClockId) -> Timespec {
backend::time::syscalls::clock_gettime(id)
}
#[cfg(not(target_os = "wasi"))]
#[inline]
pub fn clock_gettime_dynamic(id: DynamicClockId<'_>) -> io::Result<Timespec> {
backend::time::syscalls::clock_gettime_dynamic(id)
}