Closed
Description
(TimeSpec
is being added in #276)
These types aim to provide a nice Rust struct abstraction over the libc types. However, they could be revisited. Some issues I noticed:
- all the
ops
trait impls lose range on the values by callingnum_microseconds()
(num_nanoseconds()
) for implementation convenience. This reduces the usable range ofTimeVal
to +/- ~300k years (probably ok) andTimeSpec
to +/- ~300 years (not really ok). std::Duration
has been stable since 1.3.0, and we should provide interconversions, and probably deprecate all thehours()
and such methods in favour of converting from aDuration
. (This brings up version support policy Decide on a rust version support policy #238.)