pub struct RtcSynchronousProxy { /* private fields */ }
Implementations§
Source§impl RtcSynchronousProxy
impl RtcSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<RtcEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<RtcEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn persistent_disable(
&self,
___deadline: MonotonicInstant,
) -> Result<RtcPersistentDisableResult, Error>
pub fn persistent_disable( &self, ___deadline: MonotonicInstant, ) -> Result<RtcPersistentDisableResult, Error>
Call [PersistentDisable] to instruct Timekeeper not to update the RTC with the latest UTC clock estimate. Once a reply is received, the Timekeeper will not update the RTC.
This is useful in tests that exercise the RTC and must therefore write to it exclusively, possibly entering a race with Timekeeper’s own RTC updates.
NOTE: The setting persists across reboots, due to the testing persistence requirements. Implementations should have a way to limit the number of reboots for which this setting takes effect. This is to avoid a lasting behavior change resulting from problems in the test fixture.
Sourcepub fn persistent_enable(
&self,
___deadline: MonotonicInstant,
) -> Result<RtcPersistentEnableResult, Error>
pub fn persistent_enable( &self, ___deadline: MonotonicInstant, ) -> Result<RtcPersistentEnableResult, Error>
Undoes the effects of [PersistentDisable].
The test fixture should always attempt to call this method, and have it
succeed. See also the NOTE
section on [PersistentDisable].