1 //! Time-related operations. 2 3 mod clock; 4 #[cfg(any(target_os = "android", target_os = "fuchsia", target_os = "linux"))] 5 #[cfg(feature = "time")] 6 mod timerfd; 7 8 // TODO: Convert WASI'S clock APIs to use handles rather than ambient clock 9 // identifiers, update `wasi-libc`, and then add support in `rustix`. 10 #[cfg(not(any(target_os = "redox", target_os = "wasi")))] 11 pub use clock::clock_getres; 12 #[cfg(not(target_os = "wasi"))] 13 pub use clock::{clock_gettime, clock_gettime_dynamic, ClockId, DynamicClockId}; 14 pub use clock::{Nsecs, Secs, Timespec}; 15 #[cfg(any(target_os = "android", target_os = "fuchsia", target_os = "linux"))] 16 #[cfg(feature = "time")] 17 pub use timerfd::{ 18 timerfd_create, timerfd_gettime, timerfd_settime, Itimerspec, TimerfdClockId, TimerfdFlags, 19 TimerfdTimerFlags, 20 }; 21