Skip to main content

retry_until_timeout

Macro retry_until_timeout 

Source
macro_rules! retry_until_timeout {
    ($timeout_ms:literal, $sleep_ms:literal, $code:block) => { ... };
    ($timeout_ms:literal, $code:block) => { ... };
    ($code:block) => { ... };
}
Expand description

Retry a code block with an exit condition and then pause, until a timeout has elapsed. The default timeout is 5 s. The default pause is 500 ms.