-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
T-libs-apiRelevant to the library API team, which will review and decide on the RFC.Relevant to the library API team, which will review and decide on the RFC.
Description
Right now, we have:
from_secs
from_millis
as_secs
subsec_nanos
It'd be nice if we also had:
from_hours
(note: potential for overflow)from_mins
(note: potential for overflow)from_micros
from_nanos
as_hours
as_mins
subsec_millis
subsec_micros
And potentially also:
from_days
(note: potential for overflow)as_days
as_millis
(note: potential for overflow)as_micros
(note: potential for overflow)as_nanos
(note: potential for overflow)
(Note that as_millis
is already suggested by #1545).
time::Duration
already has a lot of these, and it'd be nice if the libstd version did too. These don't seem that hard to implement or maintain, and they seem useful enough to have.
ChristopherRabotin, anyputer, iago-lito and Dushistov
Metadata
Metadata
Assignees
Labels
T-libs-apiRelevant to the library API team, which will review and decide on the RFC.Relevant to the library API team, which will review and decide on the RFC.