pub struct Time {
pub delta: f32,
pub raw_delta: f32,
pub update_delta: f32,
pub accumulated: f32,
pub smooth_delta: f32,
pub frame_start: SystemTime,
pub paused: bool,
pub delta_paused: bool,
pub time_scale: f32,
/* private fields */
}
Expand description
Time structure to pass around to plugins and systems
Fields§
§delta: f32
Delta time in seconds since the last frame… scaled time_scale or may be paused
raw_delta: f32
A raw delta time not affected by any scaling or pausing
update_delta: f32
Delta time for the CPU update (ignoring v-sync / present cost)
accumulated: f32
Accumulated delta time
smooth_delta: f32
Smoothed delta time to reduce spikes
frame_start: SystemTime
System time that the last frame started
paused: bool
Control the run state of the program, pause render / update
delta_paused: bool
Control whether delta time is time or 0
time_scale: f32
Control the delta time (speed up or slo-mo)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Time
impl RefUnwindSafe for Time
impl Send for Time
impl Sync for Time
impl Unpin for Time
impl UnwindSafe for Time
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