You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tracking Issue for SystemTime::MIN and SystemTime::MAX #149067
use std::time::{Duration,SystemTime};// Adding the smallest possible Duration to SystemTime::MAX shall fail ...assert!(SystemTime::MAX.checked_add(Duration::new(0,1)).is_none());// ... whereas subtracting it shall be fine.assert!(SystemTime::MAX.checked_sub(Duration::new(0,1)).is_some());// Subtracting the smallest possible Duration from SystemTime::MIN shall fail ...assert!(SystemTime::MIN.checked_sub(Duration::new(0,1)).is_none());// ... whereas adding it shall be fine.assert!(SystemTime::MIN.checked_add(Duration::new(0,1)).is_some());
What should the bounds be on 32-bit platforms? See discussion in Add SystemTime::{MIN, MAX} #148825 (comment). Maybe better resolved by using 64-bit wide APIs on 32-bit platforms (such as __clock_gettime64 or clock_gettime_nsec_np)
Activity
time: Add issue for `time_systemtime_limits`
Rollup merge of rust-lang#148825 - cvengler:time_systemtime_limits, r…
Rollup merge of rust-lang#148825 - cvengler:time_systemtime_limits, r…
Rollup merge of rust-lang#148825 - cvengler:time_systemtime_limits, r…
Rollup merge of rust-lang#148825 - cvengler:time_systemtime_limits, r…
Rollup merge of rust-lang#148825 - cvengler:time_systemtime_limits, r…
Rollup merge of rust-lang#148825 - cvengler:time_systemtime_limits, r…
Rollup merge of rust-lang#148825 - cvengler:time_systemtime_limits, r…
Rollup merge of rust-lang#148825 - cvengler:time_systemtime_limits, r…
Unrolled build for #148825
Rollup merge of #148825 - cvengler:time_systemtime_limits, r=ChrisDenton