#[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,
}
Expand description
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
CLOCK_PROCESS_CPUTIME_ID
ThreadCPUTime = 3
CLOCK_THREAD_CPUTIME_ID
RealtimeCoarse = 5
CLOCK_REALTIME_COARSE
MonotonicCoarse = 6
CLOCK_MONOTONIC_COARSE
MonotonicRaw = 4
CLOCK_MONOTONIC_RAW
RealtimeAlarm = 8
CLOCK_REALTIME_ALARM
Boottime = 7
CLOCK_BOOTTIME
On FreeBSD, use Self::Uptime
, as CLOCK_BOOTTIME
is an alias for
CLOCK_UPTIME
.
BoottimeAlarm = 9
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 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)