pub struct RealtimeClockPoller { /* private fields */ }Expand description
Runtime poller for the realtime clock.
Holds a pre-resolved ResourceId for the Clock resource and
calibration state. Call sync() once per poll loop iteration.
Implementations§
Source§impl RealtimeClockPoller
impl RealtimeClockPoller
Sourcepub fn sync(&mut self, world: &mut World, now: Instant)
pub fn sync(&mut self, world: &mut World, now: Instant)
Sync the Clock resource with the current time.
Sourcepub fn is_accurate(&self) -> bool
pub fn is_accurate(&self) -> bool
Whether calibration achieved the configured threshold.
Sourcepub fn calibration_gap(&self) -> Duration
pub fn calibration_gap(&self) -> Duration
Best measurement gap achieved during calibration.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RealtimeClockPoller
impl RefUnwindSafe for RealtimeClockPoller
impl Send for RealtimeClockPoller
impl !Sync for RealtimeClockPoller
impl Unpin for RealtimeClockPoller
impl UnsafeUnpin for RealtimeClockPoller
impl UnwindSafe for RealtimeClockPoller
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