Struct hybrid_clocks::Clock [] [src]

pub struct Clock<S: ClockSource> { /* fields omitted */ }

The main clock type.

Methods

impl Clock<Wall>
[src]

[src]

Returns a Clock that uses wall-clock time.

impl Clock<ManualClock>
[src]

[src]

Returns a Clock that uses wall-clock time.

[src]

impl<S: ClockSource> Clock<S>
[src]

[src]

Creates a clock with src as the time provider.

[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.

[src]

Used to create a new "epoch" of clock times, mostly useful as a manual override when a cluster member has skewed the clock time far into the future.

[src]

Creates a unique monotonic timestamp suitable for annotating messages we send.

[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. Returns an Error iff the delta from our local lock to the observed timestamp is greater than our configured limit.

Trait Implementations

impl<S: Debug + ClockSource> Debug for Clock<S> where
    S::Time: Debug,
    S::Delta: Debug
[src]

[src]

Formats the value using the given formatter. Read more

impl<S: Clone + ClockSource> Clone for Clock<S> where
    S::Time: Clone,
    S::Delta: Clone
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<S> Send for Clock<S> where
    S: Send,
    <S as ClockSource>::Delta: Send,
    <S as ClockSource>::Time: Send

impl<S> Sync for Clock<S> where
    S: Sync,
    <S as ClockSource>::Delta: Sync,
    <S as ClockSource>::Time: Sync