pub struct PlaybackClock { /* private fields */ }Expand description
The clock for one playback run, asked each display refresh which time to show.
Implementations§
Source§impl PlaybackClock
impl PlaybackClock
Sourcepub fn new(
policy: PlaybackPolicy,
frame_rate: FrameRate,
rate: f64,
tick: i64,
now_ms: f64,
) -> Self
pub fn new( policy: PlaybackPolicy, frame_rate: FrameRate, rate: f64, tick: i64, now_ms: f64, ) -> Self
A clock starting at tick at wall time now_ms, playing at rate (negative is backwards).
Sourcepub const fn policy(&self) -> PlaybackPolicy
pub const fn policy(&self) -> PlaybackPolicy
The policy it enforces.
Trait Implementations§
Source§impl Clone for PlaybackClock
impl Clone for PlaybackClock
Auto Trait Implementations§
impl Freeze for PlaybackClock
impl RefUnwindSafe for PlaybackClock
impl Send for PlaybackClock
impl Sync for PlaybackClock
impl Unpin for PlaybackClock
impl UnsafeUnpin for PlaybackClock
impl UnwindSafe for PlaybackClock
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more