pub fn new<F>(timeout: Duration, f: F) -> TimerFunc<A>
    where
        F: FnOnce(&mut A, &mut A::Context) + 'static,
    {
        TimerFunc {
            f: Some(Box::new(f)),
            timeout: sleep(timeout),
        }
    }
/// Creates a new `TimerFunc` with the given duration.
Creates a new `TimerFunc` with the given duration.
Creates a new ` TimerFunc ` with the given duration .
pub fn new<F>(timeout: Duration, f: F) -> TimerFunc<A>
    where
        F: FnOnce(&mut A, &mut A::Context) + 'static,
    {
        TimerFunc {
            f: Some(Box::new(f)),
            timeout: sleep(timeout),
        }
    }
pub fn new < F > ( timeout : Duration , f : F ) -> TimerFunc < A > where F : FnOnce ( & mut A , & mut A :: Context ) + ' static , { TimerFunc { f : Some ( Box :: new ( f ) ) , timeout : sleep ( timeout ) , } }
Creates a new `TimerFunc` with the given duration.
Creates a new ` TimerFunc ` with the given duration .
timeout
Duration
f
F
timeout
Duration
f
F