pub struct FrameClock { /* private fields */ }Expand description
Wall-clock delta timer shared by SurfaceRuntime and desktop hosts (skia-shell).
Implementations§
Source§impl FrameClock
impl FrameClock
Sourcepub fn step(&mut self, active: bool) -> Option<f32>
pub fn step(&mut self, active: bool) -> Option<f32>
Advances the clock using Instant::now() when active is true, returning Some(dt_s)
clamped to MAX_DT_S (0.0 on the first active frame). Resets and returns None when
active is false.
Trait Implementations§
Auto Trait Implementations§
impl Forget for FrameClock
impl Freeze for FrameClock
impl Move for FrameClock
impl RefUnwindSafe for FrameClock
impl Send for FrameClock
impl Sync for FrameClock
impl Unpin for FrameClock
impl UnsafeUnpin for FrameClock
impl UnwindSafe for FrameClock
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