checkpoint

This commit is contained in:
John Smith
2023-05-06 21:09:40 -04:00
parent e2c5691d7e
commit 1fe5004eef
23 changed files with 627 additions and 203 deletions

View File

@@ -130,6 +130,10 @@ pub fn ms_to_us(ms: u32) -> u64 {
(ms as u64) * 1000u64
}
pub fn us_to_ms(us: u64) -> EyreResult<u32> {
u32::try_from(us / 1000u64).wrap_err("could not convert microseconds")
}
// Calculate retry attempt with logarhythmic falloff
pub fn retry_falloff_log(
last_us: u64,