pub struct TickStatus { /* private fields */ }Expand description
Tracks the simulation’s progress through time ticks, including handled skips.
Implementations§
Source§impl TickStatus
impl TickStatus
Sourcepub fn skipped(&self) -> Duration
pub fn skipped(&self) -> Duration
Returns the total duration of time that has been skipped from previous tick.
Sourcepub fn is_done_ticks(
&self,
include_zero_tick: bool,
tick_count: TimeTick,
) -> bool
pub fn is_done_ticks( &self, include_zero_tick: bool, tick_count: TimeTick, ) -> bool
Determines if the simulation has processed the required number of ticks.
This uses the previous() time as a baseline to handle cases where time
is skipped. Even if a large jump occurs, it ensures the simulation processes
up to the threshold before stopping safely.
§Arguments
include_zero_tick- Iftrue, the zero-th tick is included in the count.tick_count- The target tick threshold to reach.
Trait Implementations§
Source§impl Clone for TickStatus
impl Clone for TickStatus
Source§fn clone(&self) -> TickStatus
fn clone(&self) -> TickStatus
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TickStatus
impl Debug for TickStatus
Source§impl Hash for TickStatus
impl Hash for TickStatus
Source§impl PartialEq for TickStatus
impl PartialEq for TickStatus
Source§fn eq(&self, other: &TickStatus) -> bool
fn eq(&self, other: &TickStatus) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for TickStatus
impl Eq for TickStatus
impl StructuralPartialEq for TickStatus
Auto Trait Implementations§
impl Freeze for TickStatus
impl RefUnwindSafe for TickStatus
impl Send for TickStatus
impl Sync for TickStatus
impl Unpin for TickStatus
impl UnsafeUnpin for TickStatus
impl UnwindSafe for TickStatus
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more