pub trait ClockSource {
const ID: clockid_t;
// Required method
fn ktime_get() -> ktime_t;
}
Expand description
Trait for clock sources.
Selection of the clock source depends on the use case. In some cases the usage of a
particular clock is mandatory, e.g. in network protocols, filesystems. In other
cases the user of the clock has to decide which clock is best suited for the
purpose. In most scenarios clock Monotonic
is the best choice as it
provides a accurate monotonic notion of time (leap second smearing ignored).
Required Associated Constants§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.