pub struct EmbassyClock;Expand description
The executor’s Embassy clock, shared with task timers and WASI deadlines.
Native uses std::time::Instant; browsers use performance.now() through
Embassy’s wasm driver. Both currently use 1 MHz ticks (1 microsecond nominal
resolution). Suspend behavior follows the OS/browser and is not portable;
browser throttling can delay wakeups independently of clock readings.
Embedded platforms must supply an Embassy hardware time driver and tick rate. If its counter stops in low-power sleep, this clock excludes that interval. Deep sleep/reset starts a new epoch; instants must never be persisted. Embassy’s u64 tick counter must not wrap within a boot (at 1 MHz its range is about 584,000 years). Hardware drivers must extend narrower counters.
Trait Implementations§
Source§impl MonotonicClock for EmbassyClock
impl MonotonicClock for EmbassyClock
Auto Trait Implementations§
impl Freeze for EmbassyClock
impl RefUnwindSafe for EmbassyClock
impl Send for EmbassyClock
impl Sync for EmbassyClock
impl Unpin for EmbassyClock
impl UnsafeUnpin for EmbassyClock
impl UnwindSafe for EmbassyClock
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