pub struct Time {
pub delta_seconds: f32,
pub fixed_delta_seconds: f32,
pub interpolation_alpha: f32,
pub frame: u64,
}Expand description
Per-frame timing state shared between the simulation and the render path.
Fields§
§delta_seconds: f32Real wall-clock time elapsed since the previous frame, in seconds, clamped to a sane maximum to avoid a “spiral of death” after a long stall (debugger break, asset hitch). This is the delta game code should use for variable-rate logic.
fixed_delta_seconds: f32The fixed simulation step in seconds — the cadence the deterministic fixed-timestep agents (physics) advance at. Defaults to 1/60.
interpolation_alpha: f32Render-interpolation factor in [0, 1): the fraction of a fixed step
the accumulator carries past the last whole sim step. Render-only
transform blending uses it; it never affects simulation semantics.
frame: u64Monotonic frame counter, incremented once per rendered frame.
Implementations§
Trait Implementations§
impl Copy for Time
impl StructuralPartialEq for Time
Auto Trait Implementations§
impl Freeze for Time
impl RefUnwindSafe for Time
impl Send for Time
impl Sync for Time
impl Unpin for Time
impl UnsafeUnpin for Time
impl UnwindSafe for Time
Blanket Implementations§
Source§impl<T> AppLifecycle for Twhere
T: ?Sized,
impl<T> AppLifecycle for Twhere
T: ?Sized,
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