Struct gameloop_timing::looptimer::LoopTimer [−][src]
pub struct LoopTimer {
pub start: Instant,
pub end: Instant,
pub time: Duration,
pub target: Duration,
pub count: u32,
}Expand description
Wraps the variables necessary to keep track of loop timings.
Fields
start: InstantThe last start of the loop.
end: InstantThe last end of the loop.
time: DurationThe last time/duration of the loop.
target: DurationThe intended time/duration of the loop.
count: u32How many iterations have been done.
Implementations
Creates a new looptimer with the given target loop duration.
Creates a new looptimer with the given target loop duration and a starting instant.
Resets the loop-counter.
Auto Trait Implementations
impl RefUnwindSafe for LoopTimerimpl UnwindSafe for LoopTimer