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