pub fn repeat<G, F>(action_gen: G) -> TimerActionRepeat
    where
        G: Fn() -> F + 'static,
        F: Future<Output = Option<Duration>> + 'static,
    {
        Self::repeat_into(action_gen, crate::executor().current_task_queue()).unwrap()
    }
/// Creates a [`TimerActionRepeat`] that will execute the associated future
/// repeatedly until it returns None
///
/// # Arguments
///
/// * `action_gen` a Future to be executed repeatedly. The Future's return
///   value must be
/// Option<Duration>. If [`Some`], It will execute again after Duration
/// elapses. If `None`, it stops.
///
/// # Examples
///
/// ```no_run
/// use glommio::{timer::TimerActionRepeat, LocalExecutorBuilder};
/// use std::time::Duration;
///
/// let handle = LocalExecutorBuilder::new()
///     .spawn(|| async move {
///         let action = TimerActionRepeat::repeat(|| async move {
///             println!("Execute this!");
///             Some(Duration::from_millis(100))
///         });
///         action.join().await; // this never returns
///     })
///     .unwrap();
/// handle.join().unwrap();
/// ```
/// [`Duration`]: https://doc.rust-lang.org/std/time/struct.Duration.html
/// [`TimerActionRepeat`]: struct.TimerActionRepeat.html
Creates a [`TimerActionRepeat`] that will execute the associated future
repeatedly until it returns None
Creates a [ ` TimerActionRepeat ` ] that will execute the associated future repeatedly until it returns None
pub fn repeat<G, F>(action_gen: G) -> TimerActionRepeat
    where
        G: Fn() -> F + 'static,
        F: Future<Output = Option<Duration>> + 'static,
    {
        Self::repeat_into(action_gen, crate::executor().current_task_queue()).unwrap()
    }
pub fn repeat < G , F > ( action_gen : G ) -> TimerActionRepeat where G : Fn ( ) -> F + ' static , F : Future < Output = Option < Duration > > + ' static , { Self :: repeat_into ( action_gen , crate :: executor ( ) . current_task_queue ( ) ) . unwrap ( ) }
Creates a [`TimerActionRepeat`] that will execute the associated future
repeatedly until it returns None
Creates a [ ` TimerActionRepeat ` ] that will execute the associated future repeatedly until it returns None
action_gen
G
action_gen
G
examples
```no_run
use glommio::{timer::TimerActionRepeat, LocalExecutorBuilder};
use std::time::Duration.


` ` ` no_run use glommio :: { timer :: TimerActionRepeat LocalExecutorBuilder } ; use std :: time :: Duration .