pub struct TimeContext { /* private fields */ }Expand description
A structure that contains our time-tracking state.
Implementations§
Source§impl TimeContext
impl TimeContext
Sourcepub fn new() -> TimeContext
pub fn new() -> TimeContext
Creates a new TimeContext and initializes the start to this instant.
Sourcepub fn tick(&mut self)
pub fn tick(&mut self)
Update the state of the TimeContext to record that
another frame has taken place. Necessary for the FPS
tracking and check_update_time()
functions to work.
It’s usually not necessary to call this function yourself,
event::run() will do it for you.
Trait Implementations§
Source§impl Debug for TimeContext
impl Debug for TimeContext
Auto Trait Implementations§
impl Freeze for TimeContext
impl RefUnwindSafe for TimeContext
impl Send for TimeContext
impl Sync for TimeContext
impl Unpin for TimeContext
impl UnwindSafe for TimeContext
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
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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