pub struct RealtimeClockInstaller { /* private fields */ }Expand description
Installer for the realtime clock. Consumed at setup.
Registers a Clock resource in the World, calibrates the
monotonic-to-UTC offset, and returns a RealtimeClockPoller.
§Example
ⓘ
let mut wb = WorldBuilder::new();
let mut clock_poller = wb.install_driver(
RealtimeClockInstaller::builder().build().unwrap()
);
let mut world = wb.build();
loop {
let now = Instant::now();
clock_poller.sync(&mut world, now);
// ...
}Implementations§
Source§impl RealtimeClockInstaller
impl RealtimeClockInstaller
Sourcepub fn builder() -> RealtimeClockInstallerBuilder
pub fn builder() -> RealtimeClockInstallerBuilder
Creates a builder with sensible defaults.
Trait Implementations§
Source§impl Debug for RealtimeClockInstaller
impl Debug for RealtimeClockInstaller
Source§impl Default for RealtimeClockInstaller
impl Default for RealtimeClockInstaller
Source§impl Installer for RealtimeClockInstaller
impl Installer for RealtimeClockInstaller
Source§type Poller = RealtimeClockPoller
type Poller = RealtimeClockPoller
The concrete poller returned after installation.
Source§fn install(self, world: &mut WorldBuilder) -> RealtimeClockPoller
fn install(self, world: &mut WorldBuilder) -> RealtimeClockPoller
Register resources into the world and return a poller for dispatch.
Auto Trait Implementations§
impl Freeze for RealtimeClockInstaller
impl RefUnwindSafe for RealtimeClockInstaller
impl Send for RealtimeClockInstaller
impl Sync for RealtimeClockInstaller
impl Unpin for RealtimeClockInstaller
impl UnsafeUnpin for RealtimeClockInstaller
impl UnwindSafe for RealtimeClockInstaller
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