[−][src]Struct game_time::clock::GameTime
A specific point of time in a simulation.
GameTime knows both the wall time and game time of the simulation at a
fixed time. A GameTime object is usually created by calling
tick on a GameClock
object.
Methods
impl GameTime[src]
impl GameTimepub fn total_game_time(&self) -> FloatDuration[src]
pub fn total_game_time(&self) -> FloatDurationThe game time at the time of creation of this GameTime object.
pub fn total_wall_time(&self) -> FloatDuration[src]
pub fn total_wall_time(&self) -> FloatDurationThe wall time elapsed since the start of the simulation.
pub fn frame_start_time(&self) -> DateTime<Local>[src]
pub fn frame_start_time(&self) -> DateTime<Local>The wall time at the time of creation of this GameTime object.
pub fn elapsed_game_time(&self) -> FloatDuration[src]
pub fn elapsed_game_time(&self) -> FloatDurationThe amount of game time that passed since the previous frame.
pub fn elapsed_wall_time(&self) -> FloatDuration[src]
pub fn elapsed_wall_time(&self) -> FloatDurationThe amount of wall time that passed since the previous frame.
pub fn elapsed_time_since_frame_start(&self) -> FloatDuration[src]
pub fn elapsed_time_since_frame_start(&self) -> FloatDurationThe amount of elapsed wall time since the start of the current frame.
This value is computed from the current instant when called, based on the frame start time. This can be used for intra-frame profiling.
pub fn frame_number(&self) -> u64[src]
pub fn frame_number(&self) -> u64The index of the current frame.
This value increases by 1 for each frame created, and represents the total number of frames executed in the simulation.
pub fn instantaneous_frame_rate(&self) -> f64[src]
pub fn instantaneous_frame_rate(&self) -> f64Return the instantaneous frame rate between the last and current frames.
The "instantaneous" frame rate is computed from the last frame's elapsed time, and takes no previous frames into account.
For a more stable frame rate, use a
FrameCount object.
Trait Implementations
impl Clone for GameTime[src]
impl Clone for GameTimefn clone(&self) -> GameTime[src]
fn clone(&self) -> GameTimefn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Debug for GameTime[src]
impl Debug for GameTimeAuto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, impl<T> From for T[src]
impl<T> From for Timpl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeIdimpl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, fn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut Timpl<T, U> IntoDuration for T where
U: FromDuration<T>, [src]
impl<T, U> IntoDuration for T where
U: FromDuration<T>, type Error = <U as FromDuration<T>>::Error
fn into_duration(self) -> Result<U, <U as FromDuration<T>>::Error>[src]
fn into_duration(self) -> Result<U, <U as FromDuration<T>>::Error>