flipperzero-rs / flipperzero

Rust on the Flipper Zero
MIT License
518 stars 34 forks source link

Fix `flipperzero::furi::time::Duration::MAX` #178

Closed dcoles closed 1 month ago

dcoles commented 1 month ago

Surprisingly, Duration::MAX was not the maximum possible duration.

Duration::MAX must be able to contain the delta between any two Inteval values, but not every Duration can be used with Interval (if Duration > u32::MAX / 2 then we wouldn't be able to tell if the Instant was in the past or the future).