Skip to main content

GameClock

Trait GameClock 

Source
pub trait GameClock {
    // Required method
    fn now(&mut self) -> Instant;
}
Expand description

Output stream for the game; now returns the current instant.

Required Methods§

Source

fn now(&mut self) -> Instant

The current time. Called once per loop iteration and once per read.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§