[−][src]Struct governor::clock::QuantaUpkeepClock
A clock using the default quanta::Clock
structure and an upkeep thread.
This clock relies on an upkeep thread that wakes up in regular (user defined) intervals to retrieve the current time and update an atomic U64; the clock then can retrieve that time (and is as behind as, at most, that interval).
The background thread is stopped as soon as the last clone of the clock is dropped.
Whether this is faster than a QuantaClock
depends on the utilization of the rate limiter
and the upkeep interval that you pick; you should measure and compare performance before
picking one or the other.
Implementations
impl QuantaUpkeepClock
[src]
pub fn from_interval(interval: Duration) -> Result<QuantaUpkeepClock, Error>
[src]
Returns a new QuantaUpkeepClock
with an upkeep thread that wakes up once in interval
.
pub fn from_builder(builder: Builder) -> Result<QuantaUpkeepClock, Error>
[src]
Returns a new QuantaUpkeepClock
with an upkeep thread as specified by the given builder.
Trait Implementations
impl Clock for QuantaUpkeepClock
[src]
type Instant = QuantaInstant
A measurement of a monotonically increasing clock.
fn now(&self) -> Self::Instant
[src]
impl Clone for QuantaUpkeepClock
[src]
fn clone(&self) -> QuantaUpkeepClock
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for QuantaUpkeepClock
[src]
Auto Trait Implementations
impl !RefUnwindSafe for QuantaUpkeepClock
[src]
impl Send for QuantaUpkeepClock
[src]
impl Sync for QuantaUpkeepClock
[src]
impl Unpin for QuantaUpkeepClock
[src]
impl !UnwindSafe for QuantaUpkeepClock
[src]
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,
pub 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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,