Enum rustix::time::TimerfdClockId
source · [−]#[repr(u32)]
#[non_exhaustive]
pub enum TimerfdClockId {
Realtime,
Monotonic,
Boottime,
RealtimeAlarm,
BoottimeAlarm,
}
Expand description
CLOCK_*
constants for use with timerfd_create
.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Realtime
CLOCK_REALTIME
—A clock that tells the “real” time.
This is a clock that tells the amount of time elapsed since the Unix epoch, 1970-01-01T00:00:00Z. The clock is externally settable, so it is not monotonic. Successive reads may see decreasing times, so it isn’t reliable for measuring durations.
Monotonic
CLOCK_MONOTONIC
—A clock that tells an abstract time.
Unlike Realtime
, this clock is not based on a fixed known epoch, so
individual times aren’t meaningful. However, since it isn’t settable,
it is reliable for measuring durations.
This clock does not advance while the system is suspended; see
Boottime
for a clock that does.
Boottime
CLOCK_BOOTTIME
—Like Monotonic
, but advances while suspended.
This clock is similar to Monotonic
, but does advance while the system
is suspended.
RealtimeAlarm
CLOCK_REALTIME_ALARM
—Like Realtime
, but wakes a suspended system.
This clock is like Realtime
, but can wake up a suspended system.
Use of this clock requires the CAP_WAKE_ALARM
Linux capability.
BoottimeAlarm
CLOCK_BOOTTIME_ALARM
—Like Boottime
, but wakes a suspended system.
This clock is like Boottime
, but can wake up a suspended system.
Use of this clock requires the CAP_WAKE_ALARM
Linux capability.
Trait Implementations
sourceimpl Clone for TimerfdClockId
impl Clone for TimerfdClockId
sourcefn clone(&self) -> TimerfdClockId
fn clone(&self) -> TimerfdClockId
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for TimerfdClockId
impl Debug for TimerfdClockId
sourceimpl Hash for TimerfdClockId
impl Hash for TimerfdClockId
sourceimpl PartialEq<TimerfdClockId> for TimerfdClockId
impl PartialEq<TimerfdClockId> for TimerfdClockId
impl Copy for TimerfdClockId
impl Eq for TimerfdClockId
impl StructuralEq for TimerfdClockId
impl StructuralPartialEq for TimerfdClockId
Auto Trait Implementations
impl RefUnwindSafe for TimerfdClockId
impl Send for TimerfdClockId
impl Sync for TimerfdClockId
impl Unpin for TimerfdClockId
impl UnwindSafe for TimerfdClockId
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more