fn eventually<F: Fn() -> bool>(limit: Duration, retry: Duration, f: F) {
    let start = Instant::now();

    while !f() {
        thread::sleep(retry);

        assert!(start.elapsed() < limit);
    }
}
/// Repeatedly runs the provided function upto a timelimit of `limit`,
/// waiting `retry` interval between retries.
Repeatedly runs the provided function upto a timelimit of `limit`,
waiting `retry` interval between retries.
Repeatedly runs the provided function upto a timelimit of ` limit ` waiting ` retry ` interval between retries .
fn eventually<F: Fn() -> bool>(limit: Duration, retry: Duration, f: F) {
    let start = Instant::now();
    while !f() {
        thread::sleep(retry);
        assert!(start.elapsed() < limit);
    }
}
fn eventually < F : Fn ( ) -> bool > ( limit : Duration , retry : Duration , f : F ) { let start = Instant :: now ( ) ; while ! f ( ) { thread :: sleep ( retry ) ; assert ! ( start elapsed ( ) limit ) ; } }
Repeatedly runs the provided function upto a timelimit of `limit`,
waiting `retry` interval between retries.
Repeatedly runs the provided function upto a timelimit of ` limit ` waiting ` retry ` interval between retries .
limit
Duration
retry
Duration
f
F