pub struct SimTime {
pub entity: Rc<Entity>,
/* private fields */
}Expand description
The overall owner of time within a simulation.
Contains all Clocks and the current simulation time in ns.
Fields§
§entity: Rc<Entity>Implementations§
Source§impl SimTime
impl SimTime
pub fn new(parent: &Rc<Entity>) -> Self
pub fn get_clock(&mut self, freq_mhz: f64) -> Clock
Sourcepub fn advance_time(&mut self) -> Option<Vec<TaskWaker>>
pub fn advance_time(&mut self) -> Option<Vec<TaskWaker>>
Choose the clock with the next time and return the associated Waker.
Sourcepub fn advance_all_clocks_to(&mut self, time_ns: f64)
pub fn advance_all_clocks_to(&mut self, time_ns: f64)
Move all clocks to their next tick after the specified time.
pub fn time_now_ns(&self) -> f64
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SimTime
impl !RefUnwindSafe for SimTime
impl !Send for SimTime
impl !Sync for SimTime
impl Unpin for SimTime
impl !UnwindSafe for SimTime
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