Struct SimulationTime
pub struct SimulationTime { /* private fields */ }Implementations§
§impl SimulationTime
impl SimulationTime
pub fn new(max_delta: Duration) -> Option<SimulationTime>
pub fn new(max_delta: Duration) -> Option<SimulationTime>
Clamp each supplied frame to max_delta (nonzero, at most 60 seconds).
pub fn set_scale(&mut self, scale: f64) -> bool
pub fn set_scale(&mut self, scale: f64) -> bool
Supported scale range 0..=16. Invalid changes preserve the prior setting.
pub fn set_paused(&mut self, paused: bool)
pub fn advance(&mut self, elapsed: Duration) -> TimeStep
pub fn step_paused(&mut self, delta: Duration) -> bool
pub fn step_paused(&mut self, delta: Duration) -> bool
Manual paused simulation step. Does not apply time scale or advance a wall clock.
pub fn total(&self) -> Duration
pub fn reset(&mut self)
Trait Implementations§
§impl Default for SimulationTime
impl Default for SimulationTime
§fn default() -> SimulationTime
fn default() -> SimulationTime
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SimulationTime
impl RefUnwindSafe for SimulationTime
impl Send for SimulationTime
impl Sync for SimulationTime
impl Unpin for SimulationTime
impl UnwindSafe for SimulationTime
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