-
Notifications
You must be signed in to change notification settings - Fork 509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add subsec
methods to Duration
#1348
Comments
Let's be consistent with the recent addition and |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The standard library's
Duration
type has two useful methods:subsec_micros
subsec_millis
This has the benefit of returning a
u32
instead of aOption<i64>
. I suggest the same three methods be added to chrono 0.4. I see we already havesubsec_nanos
in the0.4.x
branch, although it wasn't released yet. So this proposal just adds the two remaining methods.Also, for consistency, should this method be called
subsec_nanoseconds
instead ofsubsec_nanos
? That's what's used inDateTime
.The text was updated successfully, but these errors were encountered: