hopr_transport_protocol::timer

Function execute_on_tick

Source
pub async fn execute_on_tick<F>(
    cycle: Duration,
    action: impl Fn() -> F,
    operation: String,
)
where F: Future<Output = ()> + Send,
Expand description

Construct an infinitely running background loop producing ticks with a given period with the maximum tick duration at most the period.