pub struct NativeHostClock { /* private fields */ }Expand description
Monotonic time from the same Driver supplied to this App’s Kernel.
Implementations§
Source§impl NativeHostClock
impl NativeHostClock
Sourcepub fn from_driver<D: RuntimeDriver>(driver: D) -> Self
pub fn from_driver<D: RuntimeDriver>(driver: D) -> Self
Captures the selected Driver; it does not create an independent epoch.
Sourcepub fn sleep_until(&self, deadline: Duration) -> LocalBoxFuture<'static, ()>
pub fn sleep_until(&self, deadline: Duration) -> LocalBoxFuture<'static, ()>
Waits in the same Driver-relative deadline domain as Self::now.
Returns the selected Driver’s future without spawning work. The caller owns polling and cancellation and must retain any generation lease for the complete operation; this clock does not extend generation authority.
Trait Implementations§
Source§impl Clone for NativeHostClock
impl Clone for NativeHostClock
Auto Trait Implementations§
impl !RefUnwindSafe for NativeHostClock
impl !Send for NativeHostClock
impl !Sync for NativeHostClock
impl !UnwindSafe for NativeHostClock
impl Freeze for NativeHostClock
impl Unpin for NativeHostClock
impl UnsafeUnpin for NativeHostClock
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