periodically

Function periodically 

Source
pub fn periodically<F: FnMut(usize) -> Result<()>>(
    rate: Duration,
    exit: &AtomicBool,
    f: F,
) -> Result<()>
Expand description

Do a thing (presumably draw some progress UI) at the given rate until the exit flag is set.