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: u32The targeted tick-rate.
time: InstantThe current point in time.
duration: DurationThe intended tick Duration.
ticks: u64The total number of ticks the gameloop went trough.
tocks: u64The total number of tocks the gameloop went trough.
last_tock: InstantThe time of the last tock to occur.
average_tickrate: f64The average tick-rate (TPS).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TockLoopEvent
impl RefUnwindSafe for TockLoopEvent
impl Send for TockLoopEvent
impl Sync for TockLoopEvent
impl Unpin for TockLoopEvent
impl UnwindSafe for TockLoopEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more