#[repr(u32)]pub enum ClockType {
Realtime = 0,
Monotonic = 1,
ProcessCPUTime = 2,
ThreadCPUTime = 3,
MonotonicRaw = 4,
RealtimeCoarse = 5,
MonotonicCoarse = 6,
BootTime = 7,
RealTimeAlarm = 8,
BootTimeAlarm = 9,
TAI = 11,
}Expand description
Equivalent of POSIX’s clock_t type.
Variants§
Realtime = 0
The identifier for the system-wide clock measuring real time. The “Wall-clock” time usually set via NTP/PTP/RTC/etc.
Monotonic = 1
The identifier for the system-wide monotonic clock, which is defined as a clock measuring
real time, whose value cannot be set via clock_settime() and which cannot have negative
clock jumps. This clock is set to some random value and increases at a constant rate in a
positive direction and can roll-over around the maximum value. Used to measure/instrument
precise durational time.
ProcessCPUTime = 2
The CPU-Time clock associated with the process making the call
ThreadCPUTime = 3
The CPU-Time clock associated with the thread making the call
MonotonicRaw = 4
RealtimeCoarse = 5
The realtime clock, but at a much coarser resolution. My system has this at 10ms
MonotonicCoarse = 6
The monotonic clock, but at a much coarser resolution. My system has this at 10ms.