Struct mioco::timer::Timer [] [src]

pub struct Timer { /* fields omitted */ }

A Timer generating event after a given time

Use MiocoHandle::select() to wait for an event, or read() to block until done.

Note the timer effective resolution is limited by underlying mio timer. See mioco::sleep() for details.

Methods

impl Timer
[src]

Create a new timer

impl Timer
[src]

Read a timer to block on it until it is done.

Returns current time

TODO: Return wakeup time instead

Try reading current time (if the timer is done)

TODO: Return wakeup time instead

Set timeout for the timer

The timeout counts from the time set_timeout is called.

Note the timer effective resolution is limited by underlying mio timer. See mioco::sleep() for details.

Set timeout for the timer using absolute time.

Get absolute value of the timer timeout.

Trait Implementations

impl Default for Timer
[src]

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

impl EventedImpl for Timer
[src]

Raw IO type wrapped by this EventImpl

Get the wrapped io

impl Send for Timer
[src]