Struct gameloop_timing::tickloop::TockLoopEvent[][src]

pub struct TockLoopEvent {
    pub target_tickrate: u32,
    pub time: Instant,
    pub duration: Duration,
    pub ticks: u64,
    pub tocks: u64,
    pub last_tock: Instant,
    pub average_tickrate: f64,
}
Expand description

Event that is spawned when a tock occurs (eg: once per second).

Fields

target_tickrate: u32

The targeted tick-rate.

time: Instant

The current point in time.

duration: Duration

The intended tick Duration.

ticks: u64

The total number of ticks the gameloop went trough.

tocks: u64

The total number of tocks the gameloop went trough.

last_tock: Instant

The time of the last tock to occur.

average_tickrate: f64

The average tick-rate (TPS).

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.