diff --git a/library/core/src/time.rs b/library/core/src/time.rs index b677776443f..850c69d8fc2 100644 --- a/library/core/src/time.rs +++ b/library/core/src/time.rs @@ -268,6 +268,11 @@ impl Duration { /// Creates a new `Duration` from the specified number of nanoseconds. /// + /// Note: Using this on the return value of `as_nanos()` might cause unexpected behavior: + /// `as_nanos()` returns a u128, and can return values that do not fit in u64, e.g. 585 years. + /// Instead, consider using the pattern `Duration::new(d.as_secs(), d.subsec_nanos())` + /// if you cannot copy/clone the Duration directly. + /// /// # Examples /// /// ```