pub struct ClockId(/* private fields */);
Expand description
Clock identifier
Newtype pattern around libc::clockid_t
.
Implementations§
source§impl ClockId
impl ClockId
sourcepub fn pid_cpu_clock_id(pid: Pid) -> Result<Self>
pub fn pid_cpu_clock_id(pid: Pid) -> Result<Self>
Returns ClockId
of a pid
CPU-time clock
sourcepub const CLOCK_BOOTTIME: ClockId = _
pub const CLOCK_BOOTTIME: ClockId = _
Starts at zero when the kernel boots and increments monotonically in SI seconds while the machine is running.
sourcepub const CLOCK_BOOTTIME_ALARM: ClockId = _
pub const CLOCK_BOOTTIME_ALARM: ClockId = _
Like CLOCK_BOOTTIME
, but will wake the system if it is
suspended..
sourcepub const CLOCK_MONOTONIC: ClockId = _
pub const CLOCK_MONOTONIC: ClockId = _
Increments in SI seconds.
sourcepub const CLOCK_MONOTONIC_COARSE: ClockId = _
pub const CLOCK_MONOTONIC_COARSE: ClockId = _
Like CLOCK_MONOTONIC
, but optimized for execution time at the expense of accuracy.
sourcepub const CLOCK_MONOTONIC_RAW: ClockId = _
pub const CLOCK_MONOTONIC_RAW: ClockId = _
Similar to CLOCK_MONOTONIC
, but provides access to a raw
hardware-based time that is not subject to NTP adjustments.
sourcepub const CLOCK_PROCESS_CPUTIME_ID: ClockId = _
pub const CLOCK_PROCESS_CPUTIME_ID: ClockId = _
Returns the execution time of the calling process.
sourcepub const CLOCK_REALTIME: ClockId = _
pub const CLOCK_REALTIME: ClockId = _
Increments as a wall clock should.
sourcepub const CLOCK_REALTIME_ALARM: ClockId = _
pub const CLOCK_REALTIME_ALARM: ClockId = _
Like CLOCK_REALTIME
, but not settable.
sourcepub const CLOCK_REALTIME_COARSE: ClockId = _
pub const CLOCK_REALTIME_COARSE: ClockId = _
Like CLOCK_REALTIME
, but optimized for execution time at the expense of accuracy.
sourcepub const CLOCK_TAI: ClockId = _
pub const CLOCK_TAI: ClockId = _
International Atomic Time.
A nonsettable system-wide clock derived from wall-clock time but ignoring leap seconds.
sourcepub const CLOCK_THREAD_CPUTIME_ID: ClockId = _
pub const CLOCK_THREAD_CPUTIME_ID: ClockId = _
Returns the execution time of the calling thread.
Trait Implementations§
source§impl Ord for ClockId
impl Ord for ClockId
source§impl PartialOrd for ClockId
impl PartialOrd for ClockId
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
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)
clone_to_uninit
)