pub struct ClockId(/* private fields */);
Expand description
Clock identifier
Newtype pattern around libc::clockid_t
.
Implementations§
Source§impl ClockId
impl ClockId
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.
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