[][src]Struct game_time::clock::GameClockBuilder

pub struct GameClockBuilder { /* fields omitted */ }

A GameClock builder, allowing for customization of the initial time and parameters.

GameClockBuilder offers fine control over the initial state of a GameClock. For most cases, using GameClock::new() is good enough. However, it can be useful to have more control in some situations, especially testing.

Methods

impl GameClockBuilder
[src]

Construct a new GameClockBuilder with default values.

Calling build on the returned object returns immediately gives the same result as GameClock::new().

Set the initial game time when the game is started.

Defaults to zero.

Set the initial wall time when the game is started.

Defaults to chrono::Local::now().

Set the initial frame number.

Defaults to 0.

Set the initial clock multiplier.

Defaults to 1.0.

Construct a GameClock object with the set parameters.

Trait Implementations

impl Default for GameClockBuilder
[src]

impl Clone for GameClockBuilder
[src]

Performs copy-assignment from source. Read more

impl Debug for GameClockBuilder
[src]

Auto Trait Implementations

impl Send for GameClockBuilder

impl Sync for GameClockBuilder

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]