Open
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.