pub struct NestedTimekeeper { /* private fields */ }
Expand description
A reference to a timekeeper running inside a nested environment which runs fake versions of the services timekeeper requires.
Implementations§
Source§impl NestedTimekeeper
impl NestedTimekeeper
Sourcepub async fn new(
clock: Arc<Clock>,
rtc_options: RtcOptions,
use_fake_clock: bool,
) -> (Self, Arc<PushSourcePuppet>, RtcUpdates, MetricEventLoggerQuerierProxy, Option<FakeClockController>)
pub async fn new( clock: Arc<Clock>, rtc_options: RtcOptions, use_fake_clock: bool, ) -> (Self, Arc<PushSourcePuppet>, RtcUpdates, MetricEventLoggerQuerierProxy, Option<FakeClockController>)
Creates a new NestedTimekeeper.
Launches an instance of timekeeper maintaining the provided |clock| in a nested environment.
If |initial_rtc_time| is provided, then the environment contains a fake RTC device that reports the time as |initial_rtc_time|.
If use_fake_clock is true, also launches a fake monotonic clock service.
Returns a NestedTimekeeper
, handles to the PushSource and RTC it obtains updates from,
Cobalt debug querier, and a fake clock control handle if use_fake_clock is true.
Trait Implementations§
Source§impl Into<RealmInstance> for NestedTimekeeper
impl Into<RealmInstance> for NestedTimekeeper
Source§fn into(self) -> RealmInstance
fn into(self) -> RealmInstance
Converts this type into the (usually inferred) input type.
Auto Trait Implementations§
impl Freeze for NestedTimekeeper
impl !RefUnwindSafe for NestedTimekeeper
impl Send for NestedTimekeeper
impl Sync for NestedTimekeeper
impl Unpin for NestedTimekeeper
impl !UnwindSafe for NestedTimekeeper
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