Document rounding in std::time::Duration's subsec_millis etc. #52263
Labels
A-docs
Area: documentation for any part of the project, including the compiler, standard library, and tools
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
In
std::time::Duration
's documentation, it's stated howas_secs
rounds, however it's not stated howsunsec_millis
andsubsec_micros
round.In the implementations:
pub const fn subsec_millis(&self) -> u32 { self.nanos / NANOS_PER_MILLI }
they round toward zero.
The text was updated successfully, but these errors were encountered: