Struct tokio_timer::Timer [] [src]

pub struct Timer { /* fields omitted */ }

A facility for scheduling timeouts

Methods

impl Timer
[src]

Returns a future that completes once the given instant has been reached

Allow the given future to execute for at most duration time.

If the given future completes within the given time, then the Timeout future will complete with that result. If duration expires, the Timeout future completes with a TimeoutError.

Allow the given stream to execute for at most duration time per yielded value.

If the given stream yields a value within the allocated duration, then value is returned and the timeout is reset for the next value. If the duration expires, then the stream will error with a TimeoutError.

Creates a new interval which will fire at dur time into the future, and will repeat every dur interval after

Creates a new interval which will fire at the time specified by at, and then will repeat every dur interval after

Trait Implementations

impl Clone for Timer
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Default for Timer
[src]

Returns the "default value" for a type. Read more

impl Debug for Timer
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Timer

impl Sync for Timer