[−][src]Struct utsl_hybrid_clocks::Clock
The main clock type.
Implementations
impl Clock<WallMS>
[src]
impl Clock<ManualClock>
[src]
pub fn manual(t: u64) -> Result<Clock<ManualClock>>
[src]
Returns a Clock
that uses ManualClock-clock time.
pub fn set_time(&mut self, t: u64)
[src]
impl<S: ClockSource> Clock<S>
[src]
pub fn new(src: S) -> Result<Self>
[src]
Creates a clock with src
as the time provider.
pub fn with_max_diff(self, max_offset: S::Delta) -> OffsetLimiter<S>
[src]
Creates a clock with src
as the time provider, and diff
as how far
in the future we don't mind seeing updates from.
pub fn now(&mut self) -> Result<Timestamp<S::Time>>
[src]
Creates a unique monotonic timestamp suitable for annotating messages we send.
pub fn observe(&mut self, msg: &Timestamp<S::Time>)
[src]
Accepts a timestamp from an incoming message, and updates the clock
so that further calls to now
will always return a timestamp that
happens-after
either locally generated timestamps or that of the
input message.
Trait Implementations
impl<S: Clone + ClockSource> Clone for Clock<S> where
S::Time: Clone,
[src]
S::Time: Clone,
impl<S: Debug + ClockSource> Debug for Clock<S> where
S::Time: Debug,
[src]
S::Time: Debug,
Auto Trait Implementations
impl<S> RefUnwindSafe for Clock<S> where
S: RefUnwindSafe,
<S as ClockSource>::Time: RefUnwindSafe,
S: RefUnwindSafe,
<S as ClockSource>::Time: RefUnwindSafe,
impl<S> Send for Clock<S> where
S: Send,
<S as ClockSource>::Time: Send,
S: Send,
<S as ClockSource>::Time: Send,
impl<S> Sync for Clock<S> where
S: Sync,
<S as ClockSource>::Time: Sync,
S: Sync,
<S as ClockSource>::Time: Sync,
impl<S> Unpin for Clock<S> where
S: Unpin,
<S as ClockSource>::Time: Unpin,
S: Unpin,
<S as ClockSource>::Time: Unpin,
impl<S> UnwindSafe for Clock<S> where
S: UnwindSafe,
<S as ClockSource>::Time: UnwindSafe,
S: UnwindSafe,
<S as ClockSource>::Time: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,