-
Notifications
You must be signed in to change notification settings - Fork 673
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
Timespec #475
Timespec #475
Conversation
By exposing its members, nix allowed users to create denormalized TimeVals, which don't work with the derived() Eq and Ord methods. Better to make TimeVal opaque, so it will always be normalized.
Also, add trait TimeValLike, so some code can be shared between TimeSpec and TimeVal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you plan on adding anything that uses TimeSpec? Right now, it seems a bit useless.
And the test_select is broken on i686 builds (except for Rust 1.7 for some reason)
Regarding Type(..)
newtypes: iirc we once discussed using Type { field: libctype }
over Type(libctype)
, but I cannot remember the reason. Right now I cannot think of one, and would prefer Type(libctype)
in general (because it's simpler :)).
Otherwise looks good.
@fiveop Yes, I have another WIP branch that adds POSIX AIO support, and |
Also, fix the TimeSpec::cmp and TimeVal::cmp methods, and fix some formatting
Looks good to me (except for missing documentation). @homu r+ |
📌 Commit 24eefcc has been approved by |
⚡ Test exempted - status |
Timespec Make TimeVal an opaque Newtype, and add another Newtype for Timespec.
Make TimeVal an opaque Newtype, and add another Newtype for Timespec.