Struct dharma::timer::Timer [] [src]

pub struct Timer<F> where
    F: FnMut() -> ()
{ /* fields omitted */ }

General purpose timer implementing EventHandler.

Methods

impl<F> Timer<F> where
    F: FnMut() -> ()
[src]

Constructs new Timer expiring periodically with given interval and calling given callback.

Trait Implementations

impl<F> EventHandler for Timer<F> where
    F: FnMut() -> ()
[src]

Returns file descriptor.

Callback function executed on event received.

This method is called by Dispatcher right after adding this EventHandler. Passed value is newly assigned ID of EventHandler which can be later used to delete it from Dispatcher. Read more