pub struct FixedClock { /* private fields */ }Expand description
Accumulator clock that never requests an unbounded number of updates.
use std::time::Duration;
use rayengine_core::time::FixedClock;
let mut clock = FixedClock::new(60, 8);
let frame = clock.advance(Duration::from_millis(20));
assert_eq!(frame.steps, 1);
assert!(frame.alpha > 0.0 && frame.alpha < 1.0);Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FixedClock
impl RefUnwindSafe for FixedClock
impl Send for FixedClock
impl Sync for FixedClock
impl Unpin for FixedClock
impl UnsafeUnpin for FixedClock
impl UnwindSafe for FixedClock
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