[−][src]Struct ticktock::timer::TimerBuilder
A timer builder
Internally used to construct timers; cannot be constructed manually.
Methods
impl<F, V, R> TimerBuilder<F, V, R> where
F: Fn(Duration, &mut V) -> R,
[src]
F: Fn(Duration, &mut V) -> R,
pub fn every(self, interval: Duration) -> Self
[src]
Execute time in fixed intervals
The timer will repeat after waiting interval
. Time spent executing
the timer is ignored.
pub fn once(self, delay: Duration) -> Self
[src]
Execute once after a delay
pub fn start(self, now: Instant) -> Timer<F, V, R>
[src]
Start the timer
Starting means recording the passed in now
as the timer's start time
(and basis for calculations).
Trait Implementations
impl<F: Debug, V: Debug, R: Debug> Debug for TimerBuilder<F, V, R> where
F: Fn(Duration, &mut V) -> R,
[src]
F: Fn(Duration, &mut V) -> R,
Auto Trait Implementations
impl<F, V, R> RefUnwindSafe for TimerBuilder<F, V, R> where
F: RefUnwindSafe,
V: RefUnwindSafe,
F: RefUnwindSafe,
V: RefUnwindSafe,
impl<F, V, R> Send for TimerBuilder<F, V, R> where
F: Send,
V: Send,
F: Send,
V: Send,
impl<F, V, R> Sync for TimerBuilder<F, V, R> where
F: Sync,
V: Sync,
F: Sync,
V: Sync,
impl<F, V, R> Unpin for TimerBuilder<F, V, R> where
F: Unpin,
V: Unpin,
F: Unpin,
V: Unpin,
impl<F, V, R> UnwindSafe for TimerBuilder<F, V, R> where
F: UnwindSafe,
V: UnwindSafe,
F: UnwindSafe,
V: 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, 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>,