Skip to content
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

Redesign TimeVal and TimeSpec #277

Closed
kamalmarhubi opened this issue Feb 20, 2016 · 1 comment
Closed

Redesign TimeVal and TimeSpec #277

kamalmarhubi opened this issue Feb 20, 2016 · 1 comment

Comments

@kamalmarhubi
Copy link
Member

(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 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.)
@Susurrus
Copy link
Contributor

Susurrus commented Dec 5, 2017

Closing this in favor of #516 which has some more discussion in it.

@Susurrus Susurrus closed this as completed Dec 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants