-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Checked arithmetic is wrong for Durations smaller than 100ns on Windows #149995
Copy link
Copy link
Open
Labels
C-bugCategory: This is a bug.Category: This is a bug.O-windowsOperating system: WindowsOperating system: WindowsT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.O-windowsOperating system: WindowsOperating system: WindowsT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.
Type
Fields
Give feedbackNo fields configured for issues without a type.
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.