pub struct WallClock { /* private fields */ }Expand description
A real-time clock backed by std::time::Instant.
The first call to delta returns 0.0 (no elapsed time since creation).
§Example
use animato_driver::{Clock, WallClock};
let mut clk = WallClock::new();
let dt = clk.delta(); // first call: ~0.0
assert!(dt >= 0.0);Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WallClock
impl RefUnwindSafe for WallClock
impl Send for WallClock
impl Sync for WallClock
impl Unpin for WallClock
impl UnsafeUnpin for WallClock
impl UnwindSafe for WallClock
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more