pub struct ClockId(/* private fields */);time only.Expand description
Clock identifier
Newtype pattern around libc::clockid_t.
Implementations§
Source§impl ClockId
impl ClockId
Sourcepub const CLOCK_BOOTTIME: ClockId
Available on linux_android or Emscripten or Fuchsia only.
pub const CLOCK_BOOTTIME: ClockId
linux_android or Emscripten or Fuchsia only.Starts at zero when the kernel boots and increments monotonically in SI seconds while the machine is running.
Sourcepub const CLOCK_BOOTTIME_ALARM: ClockId
Available on linux_android or Emscripten or Fuchsia only.
pub const CLOCK_BOOTTIME_ALARM: ClockId
linux_android or Emscripten or Fuchsia only.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
Available on linux_android or Emscripten or Fuchsia only.
pub const CLOCK_MONOTONIC_COARSE: ClockId
linux_android or Emscripten or Fuchsia only.Like CLOCK_MONOTONIC, but optimized for execution time at the expense of accuracy.
Sourcepub const CLOCK_MONOTONIC_RAW: ClockId
Available on linux_android or Emscripten or Fuchsia only.
pub const CLOCK_MONOTONIC_RAW: ClockId
linux_android or Emscripten or Fuchsia only.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
Available on linux_android or apple_targets or freebsdlike or Emscripten or Fuchsia or Redox only.
pub const CLOCK_PROCESS_CPUTIME_ID: ClockId
linux_android or apple_targets or freebsdlike or Emscripten or Fuchsia or Redox only.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
Available on linux_android or Emscripten or Fuchsia only.
pub const CLOCK_REALTIME_ALARM: ClockId
linux_android or Emscripten or Fuchsia only.Like CLOCK_REALTIME, but not settable.
Sourcepub const CLOCK_REALTIME_COARSE: ClockId
Available on linux_android or Emscripten or Fuchsia only.
pub const CLOCK_REALTIME_COARSE: ClockId
linux_android or Emscripten or Fuchsia only.Like CLOCK_REALTIME, but optimized for execution time at the expense of accuracy.
Sourcepub const CLOCK_TAI: ClockId
Available on linux_android or Emscripten or Fuchsia only.
pub const CLOCK_TAI: ClockId
linux_android or Emscripten or Fuchsia only.International Atomic Time.
A nonsettable system-wide clock derived from wall-clock time but ignoring leap seconds.
Sourcepub const CLOCK_THREAD_CPUTIME_ID: ClockId
Available on linux_android or apple_targets or freebsdlike or Emscripten or Fuchsia only.
pub const CLOCK_THREAD_CPUTIME_ID: ClockId
linux_android or apple_targets or freebsdlike or Emscripten or Fuchsia only.Returns the execution time of the calling thread.
Sourcepub fn pid_cpu_clock_id(pid: Pid) -> Result<Self>
Available on crate feature process only.
pub fn pid_cpu_clock_id(pid: Pid) -> Result<Self>
process only.Returns ClockId of a pid CPU-time clock
Sourcepub fn res(self) -> Result<TimeSpec>
Available on non-Redox only.
pub fn res(self) -> Result<TimeSpec>
Returns resolution of the clock id