Type Alias ftvf::Status

source ·
pub type Status = Reading;
👎Deprecated since 0.6.0: use Reading instead

Aliased Type§

enum Status {
    Tick,
    Frame {
        phase: f32,
    },
    Idle {
        duration: Duration,
    },
    TimeWentBackwards,
    TicksLost,
}

Variants§

§

Tick

You should perform a logic tick.

§

Frame

Fields

§phase: f32

Indicates where in time we are. In the range 0 (previous tick) to 1 (current tick), inclusive.

You should render a frame.

§

Idle

Fields

§duration: Duration

Indicates how long you need to sleep before it will be time for another tick or frame.

No Tick or Frame occurred this sample. If you call std::thread::sleep(duration) (or equivalent) and then sample again, you will have waited exactly long enough for the next Tick or Frame to appear.

§

TimeWentBackwards

The NowSource reported a timestamp strictly earlier than a previous timestamp. This should never happen. A temporal anomaly has happened. This should be handled by showing some sort of warning, or ignored.

ftvf currently fails to detect temporal anomalies that result in one tick or less of “slip”.

§

TicksLost

Time is passing more quickly than we can process ticks; specifically, more than the Metronome’s max_ticks_behind ticks worth of time has passed since the last time we finished a batch of ticks. This should be handled by showing some sort of warning, or ignored.

Trait Implementations§

source§

impl Clone for Reading

source§

fn clone(&self) -> Reading

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Reading

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq<Reading> for Reading

source§

fn eq(&self, other: &Reading) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for Reading

source§

impl StructuralPartialEq for Reading