Struct eventual::Timer
[−]
[src]
pub struct Timer { // some fields omitted }
Provides timeouts as a Future
and periodic ticks as a Stream
.
Methods
impl Timer
fn new() -> Timer
Creates a new timer backed by a thread pool with 5 threads.
fn with_capacity(capacity: u32) -> Timer
Creates a new timer backed by a thread pool with capacity
threads.
fn timeout_ms(&self, ms: u32) -> Future<(), ()>
Returns a Future
that will be completed in ms
milliseconds
fn interval_ms(&self, ms: u32) -> Stream<(), ()>
Return a Stream
with values realized every ms
milliseconds.