pub struct SimulatedNode {
pub node_id: NodeId,
pub time_engine: TimeEngine,
pub drift_model: ClockDriftModel,
/* private fields */
}Expand description
Simulated node with time engine
Fields§
§node_id: NodeIdNode ID
time_engine: TimeEngineTime engine
drift_model: ClockDriftModelClock drift model
Implementations§
Source§impl SimulatedNode
impl SimulatedNode
pub fn new( node_id: NodeId, config: TimeEngineConfig, drift: ClockDriftModel, seed: u64, ) -> Self
Sourcepub fn tau_p(&self) -> PerceptualTime
pub fn tau_p(&self) -> PerceptualTime
Get current perceptual time
Sourcepub fn reality_window(&self) -> RealityWindow
pub fn reality_window(&self) -> RealityWindow
Get reality window
Sourcepub fn classify(&self, t: StateTime) -> TimePosition
pub fn classify(&self, t: StateTime) -> TimePosition
Classify a time position
Sourcepub fn tick_count(&self) -> u64
pub fn tick_count(&self) -> u64
Get tick count
Auto Trait Implementations§
impl Freeze for SimulatedNode
impl RefUnwindSafe for SimulatedNode
impl Send for SimulatedNode
impl Sync for SimulatedNode
impl Unpin for SimulatedNode
impl UnsafeUnpin for SimulatedNode
impl UnwindSafe for SimulatedNode
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