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

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 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 Debug for GameTime
[src]

Formats the value using the given formatter.

impl Clone for GameTime
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more