pub fn new<F>(dur: Duration, f: F) -> IntervalFunc<A>
    where
        F: FnMut(&mut A, &mut A::Context) + 'static,
    {
        Self {
            f: Box::new(f),
            dur,
            timer: sleep(dur),
        }
    }
/// Creates a new `IntervalFunc` with the given interval duration.
Creates a new `IntervalFunc` with the given interval duration.
Creates a new ` IntervalFunc ` with the given interval duration .
pub fn new<F>(dur: Duration, f: F) -> IntervalFunc<A>
    where
        F: FnMut(&mut A, &mut A::Context) + 'static,
    {
        Self {
            f: Box::new(f),
            dur,
            timer: sleep(dur),
        }
    }
pub fn new < F > ( dur : Duration , f : F ) -> IntervalFunc < A > where F : FnMut ( & mut A , & mut A :: Context ) + ' static , { Self { f : Box :: new ( f ) , dur , timer : sleep ( dur ) , } }
Creates a new `IntervalFunc` with the given interval duration.
Creates a new ` IntervalFunc ` with the given interval duration .
dur
Duration
f
F
dur
Duration
f
F