You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 calling num_microseconds() (num_nanoseconds()) for implementation convenience. This reduces the usable range of TimeVal to +/- ~300k years (probably ok) and TimeSpec to +/- ~300 years (not really ok).
std::Duration has been stable since 1.3.0, and we should provide interconversions, and probably deprecate all the hours() and such methods in favour of converting from a Duration. (This brings up version support policy Decide on a rust version support policy #238.)
The text was updated successfully, but these errors were encountered:
(
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:
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.)The text was updated successfully, but these errors were encountered: