#[non_exhaustive]#[repr(i32)]pub enum ClockId {
Realtime = 0,
Monotonic = 1,
ProcessCPUTime = 2,
ThreadCPUTime = 3,
RealtimeCoarse = 5,
MonotonicCoarse = 6,
MonotonicRaw = 4,
RealtimeAlarm = 8,
Boottime = 7,
BoottimeAlarm = 9,
}Available on crate feature
time and (crate features thread or time) and neither apple nor WASI and neither ESP-IDF nor Windows and non-WASI only.Expand description
clockid_t
CLOCK_* constants for use with clock_gettime.
These constants are always supported at runtime, so clock_gettime never
has to fail with INVAL due to an unsupported clock. See
DynamicClockId for a greater set of clocks, with the caveat that not
all of them are always supported.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Realtime = 0
CLOCK_REALTIME
Monotonic = 1
CLOCK_MONOTONIC
ProcessCPUTime = 2
Available on neither
solarish nor Horizon nor NetBSD nor Play Station Vita nor Redox OS.CLOCK_PROCESS_CPUTIME_ID
ThreadCPUTime = 3
Available on neither
solarish nor Horizon nor NetBSD nor Play Station Vita nor Redox OS.CLOCK_THREAD_CPUTIME_ID
RealtimeCoarse = 5
Available on
linux_kernel or FreeBSD only.CLOCK_REALTIME_COARSE
MonotonicCoarse = 6
Available on
linux_kernel or FreeBSD only.CLOCK_MONOTONIC_COARSE
MonotonicRaw = 4
Available on
linux_kernel only.CLOCK_MONOTONIC_RAW
RealtimeAlarm = 8
Available on
linux_kernel only.CLOCK_REALTIME_ALARM
Boottime = 7
Available on
linux_kernel or Fuchsia or OpenBSD only.CLOCK_BOOTTIME
BoottimeAlarm = 9
Available on
linux_kernel or Fuchsia only.CLOCK_BOOTTIME_ALARM
Trait Implementations§
impl Copy for ClockId
impl Eq for ClockId
impl StructuralPartialEq for ClockId
Auto Trait Implementations§
impl Freeze for ClockId
impl RefUnwindSafe for ClockId
impl Send for ClockId
impl Sync for ClockId
impl Unpin for ClockId
impl UnsafeUnpin for ClockId
impl UnwindSafe for ClockId
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more