pub struct Timing {
pub delta: f64,
pub started_at: Instant,
pub now: Instant,
pub last: Instant,
pub updates: usize,
pub renders: usize,
pub accumulated_time: f64,
pub fixed_time_step: f64,
pub fixed_time_step_f32: f32,
pub stats: Stats,
/* private fields */
}
Expand description
Used to track time in games
Fields§
§delta: f64
amount of time that has passed since last
started_at: Instant
when execution started
now: Instant
time at start of frame
last: Instant
time at start of last frame
updates: usize
number of updates so far
renders: usize
number of renders so far
accumulated_time: f64
§fixed_time_step: f64
an fps independent value used to update animations, etc
fixed_time_step_f32: f32
an fps independent value used to update animations, etc
stats: Stats
FPS
Implementations§
Trait Implementations§
impl StructuralPartialEq for Timing
Auto Trait Implementations§
impl Freeze for Timing
impl RefUnwindSafe for Timing
impl Send for Timing
impl Sync for Timing
impl Unpin for Timing
impl UnwindSafe for Timing
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