[][src]Struct game_time::clock::GameTime

pub struct GameTime { /* fields omitted */ }

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]

The game time at the time of creation of this GameTime object.

The wall time elapsed since the start of the simulation.

The wall time at the time of creation of this GameTime object.

The amount of game time that passed since the previous frame.

The amount of wall time that passed since the previous frame.

The 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.

The 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.

Return 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]

Performs copy-assignment from source. Read more

impl Debug for GameTime
[src]

Auto Trait Implementations

impl Send for GameTime

impl Sync for GameTime

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

impl<T> From for T
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> IntoDuration for T where
    U: FromDuration<T>, 
[src]