diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:32 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:32 +0000 |
commit | 4547b622d8d29df964fa2914213088b148c498fc (patch) | |
tree | 9fc6b25f3c3add6b745be9a2400a6e96140046e9 /vendor/rustix/src/time | |
parent | Releasing progress-linux version 1.66.0+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-4547b622d8d29df964fa2914213088b148c498fc.tar.xz rustc-4547b622d8d29df964fa2914213088b148c498fc.zip |
Merging upstream version 1.67.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/rustix/src/time')
-rw-r--r-- | vendor/rustix/src/time/clock.rs | 12 | ||||
-rw-r--r-- | vendor/rustix/src/time/timerfd.rs | 13 |
2 files changed, 12 insertions, 13 deletions
diff --git a/vendor/rustix/src/time/clock.rs b/vendor/rustix/src/time/clock.rs index 32d888749..2e23f91b8 100644 --- a/vendor/rustix/src/time/clock.rs +++ b/vendor/rustix/src/time/clock.rs @@ -1,10 +1,10 @@ -use crate::{imp, io}; +use crate::{backend, io}; -pub use imp::time::types::{Nsecs, Secs, Timespec}; +pub use backend::time::types::{Nsecs, Secs, Timespec}; /// `clockid_t` #[cfg(any(not(target_os = "wasi")))] -pub use imp::time::types::{ClockId, DynamicClockId}; +pub use backend::time::types::{ClockId, DynamicClockId}; /// `clock_getres(id)`—Returns the resolution of a clock. /// @@ -18,7 +18,7 @@ pub use imp::time::types::{ClockId, DynamicClockId}; #[inline] #[must_use] pub fn clock_getres(id: ClockId) -> Timespec { - imp::time::syscalls::clock_getres(id) + backend::time::syscalls::clock_getres(id) } /// `clock_gettime(id)`—Returns the current value of a clock. @@ -38,7 +38,7 @@ pub fn clock_getres(id: ClockId) -> Timespec { #[inline] #[must_use] pub fn clock_gettime(id: ClockId) -> Timespec { - imp::time::syscalls::clock_gettime(id) + backend::time::syscalls::clock_gettime(id) } /// Like [`clock_gettime`] but with support for dynamic clocks. @@ -52,5 +52,5 @@ pub fn clock_gettime(id: ClockId) -> Timespec { #[cfg(not(target_os = "wasi"))] #[inline] pub fn clock_gettime_dynamic(id: DynamicClockId<'_>) -> io::Result<Timespec> { - imp::time::syscalls::clock_gettime_dynamic(id) + backend::time::syscalls::clock_gettime_dynamic(id) } diff --git a/vendor/rustix/src/time/timerfd.rs b/vendor/rustix/src/time/timerfd.rs index 5abe6ff52..7f661f7d9 100644 --- a/vendor/rustix/src/time/timerfd.rs +++ b/vendor/rustix/src/time/timerfd.rs @@ -1,8 +1,7 @@ -use crate::fd::AsFd; -use crate::imp; -use crate::io::{self, OwnedFd}; +use crate::fd::{AsFd, OwnedFd}; +use crate::{backend, io}; -pub use imp::time::types::{Itimerspec, TimerfdClockId, TimerfdFlags, TimerfdTimerFlags}; +pub use backend::time::types::{Itimerspec, TimerfdClockId, TimerfdFlags, TimerfdTimerFlags}; /// `timerfd_create(clockid, flags)`—Create a timer. /// @@ -12,7 +11,7 @@ pub use imp::time::types::{Itimerspec, TimerfdClockId, TimerfdFlags, TimerfdTime /// [Linux]: https://man7.org/linux/man-pages/man2/timerfd_create.2.html #[inline] pub fn timerfd_create(clockid: TimerfdClockId, flags: TimerfdFlags) -> io::Result<OwnedFd> { - imp::time::syscalls::timerfd_create(clockid, flags) + backend::time::syscalls::timerfd_create(clockid, flags) } /// `timerfd_settime(clockid, flags, new_value)`—Set the time on a timer. @@ -27,7 +26,7 @@ pub fn timerfd_settime<Fd: AsFd>( flags: TimerfdTimerFlags, new_value: &Itimerspec, ) -> io::Result<Itimerspec> { - imp::time::syscalls::timerfd_settime(fd.as_fd(), flags, new_value) + backend::time::syscalls::timerfd_settime(fd.as_fd(), flags, new_value) } /// `timerfd_gettime(clockid, flags)`—Query a timer. @@ -38,5 +37,5 @@ pub fn timerfd_settime<Fd: AsFd>( /// [Linux]: https://man7.org/linux/man-pages/man2/timerfd_gettime.2.html #[inline] pub fn timerfd_gettime<Fd: AsFd>(fd: Fd) -> io::Result<Itimerspec> { - imp::time::syscalls::timerfd_gettime(fd.as_fd()) + backend::time::syscalls::timerfd_gettime(fd.as_fd()) } |