pub fn interval<S, F, R>(s: S, period: Duration, fun: F) -> impl Lifecycle where
    S: Clone + 'static + Send + Sync,
    F: Fn(S) -> R + Send + Sync + 'static,
    R: Future<Output = ()> + Send