mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-07 01:05:39 +03:00
9ba278e1b0
time: Add saturating arithmetic for `SystemTime` This commit implements the following methods: * `SystemTime::saturating_add` * `SystemTime::saturating_sub` * `SystemTime::saturating_duration_since` The implementation of these methods is rather trivial, as the main logic lies behind the constants `SystemTime::MIN` and `SystemTime::MAX`. See also: * Accepted ACP: rust-lang/libs-team#718 * Tracking Issue: rust-lang/rust#151199