From ef24de24a82fe681581cc130f342363c47c0969a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 7 Jun 2024 07:48:48 +0200 Subject: Merging upstream version 1.75.0+dfsg1. Signed-off-by: Daniel Baumann --- vendor/rustix-0.37.6/src/time/clock.rs | 78 ---------------------------------- 1 file changed, 78 deletions(-) delete mode 100644 vendor/rustix-0.37.6/src/time/clock.rs (limited to 'vendor/rustix-0.37.6/src/time/clock.rs') diff --git a/vendor/rustix-0.37.6/src/time/clock.rs b/vendor/rustix-0.37.6/src/time/clock.rs deleted file mode 100644 index 1bf74d60b..000000000 --- a/vendor/rustix-0.37.6/src/time/clock.rs +++ /dev/null @@ -1,78 +0,0 @@ -use crate::{backend, io}; - -pub use backend::time::types::{Nsecs, Secs, Timespec}; - -/// `clockid_t` -#[cfg(not(target_os = "wasi"))] -pub use backend::time::types::{ClockId, DynamicClockId}; - -/// `clock_getres(id)`—Returns the resolution of a clock. -/// -/// # References -/// - [POSIX] -/// - [Linux] -/// -/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/clock_getres.html -/// [Linux]: https://man7.org/linux/man-pages/man2/clock_getres.2.html -#[cfg(not(any(target_os = "redox", target_os = "wasi")))] -#[inline] -#[must_use] -pub fn clock_getres(id: ClockId) -> Timespec { - backend::time::syscalls::clock_getres(id) -} - -/// `clock_gettime(id)`—Returns the current value of a clock. -/// -/// This function uses `ClockId` which only contains clocks which are known to -/// always be supported at runtime, allowing this function to be infallible. -/// For a greater set of clocks and dynamic clock support, see -/// [`clock_gettime_dynamic`]. -/// -/// # References -/// - [POSIX] -/// - [Linux] -/// -/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/clock_gettime.html -/// [Linux]: https://man7.org/linux/man-pages/man2/clock_gettime.2.html -#[cfg(not(target_os = "wasi"))] -#[inline] -#[must_use] -pub fn clock_gettime(id: ClockId) -> Timespec { - backend::time::syscalls::clock_gettime(id) -} - -/// Like [`clock_gettime`] but with support for dynamic clocks. -/// -/// # References -/// - [POSIX] -/// - [Linux] -/// -/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/clock_gettime.html -/// [Linux]: https://man7.org/linux/man-pages/man2/clock_gettime.2.html -#[cfg(not(target_os = "wasi"))] -#[inline] -pub fn clock_gettime_dynamic(id: DynamicClockId<'_>) -> io::Result { - backend::time::syscalls::clock_gettime_dynamic(id) -} - -/// `clock_settime(id, timespec)`—Sets the current value of a settable clock. -/// -/// This fails with [`io::Errno::INVAL`] if the clock is not settable, and -/// [`io::Errno::ACCESS`] if the current process does not have permission to -/// set it. -/// -/// # References -/// - [POSIX] -/// - [Linux] -/// -/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/clock_settime.html -/// [Linux]: https://man7.org/linux/man-pages/man2/clock_settime.2.html -#[cfg(not(any( - target_os = "redox", - target_os = "wasi", - all(apple, not(target_os = "macos")) -)))] -#[inline] -pub fn clock_settime(id: ClockId, timespec: Timespec) -> io::Result<()> { - backend::time::syscalls::clock_settime(id, timespec) -} -- cgit v1.2.3