I tried this code:
let system_time: SystemTime = ...;
// Add 1ns.
system_time.checked_add(Duration::new(0, 1)).unwrap();
I expected to see this happen: The unwrap to fail because SystemTime on Windows only has an accuracy of 100ns.
Instead, this happened: The addition "works" by returning some, although the value is unchanged from the original one, meaning an addition of a Duration < 100ns is equivalent of adding Duration::ZERO.
I tried this code:
I expected to see this happen: The unwrap to fail because
SystemTimeon Windows only has an accuracy of 100ns.Instead, this happened: The addition "works" by returning some, although the value is unchanged from the original one, meaning an addition of a
Duration< 100ns is equivalent of addingDuration::ZERO.