pub trait Clock:
Send
+ Sync
+ Debug {
// Required method
fn now(&self) -> Timestamp;
}Expand description
A monotonic clock.
One dynamic call per sample — negligible next to a KMS ioctl. Implementors
must be monotonic: successive now values must never
decrease, or pacing arithmetic downstream saturates to zero and stalls.
Send + Sync because a scene and its sources may sample the clock from
different threads; the C++ Clock& carries the same expectation implicitly.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".