Function ambient_api::prelude::fixed_rate_tick
source · pub fn fixed_rate_tick(
dt: Duration,
callback: impl FnMut(Duration) + 'static
) -> Listener
Expand description
Runs callback
at most every dt
. The actual time taken is passed to callback
.
Note that this is bound by the length of the tick, so if your environment is running
slower than dt
, this will not run at the expected rate.