Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork1.5k
UseDuration
based uptime across uucore#7926
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
you probably noticed that a few jobs are failing |
Oh yes, just getting a draft PR on the issue now while I work on it, this commit won't build yet. I'll mark ready for review when it's good enough to look at. |
This PR depends on the changes in#7910 so once that is merged I can rebase this branch on main. |
GNU testsuite comparison:
|
if upsecs >=0{ | ||
print_uptime(Some(upsecs))?; | ||
let uptime =get_uptime(None); | ||
if uptime.is_ok() >=0{ |
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.
This can't be negative anymore, right?
So maybeif let Some(uptime) = uptime {
would be easier.
I think177fae1 looks good, would it be possible to rebase just that commit on |
Uh oh!
There was an error while loading.Please reload this page.
Closes#7851
Changes the
i64
based uptime returned by uucore'sget_uptime
into anstd::time::Duration
and updates callsites.get_uptime
modified to accept fractional seconds from/proc/uptime
and returnDuration
uucore/.../features/uptime.rs
anduu/.../uptime.rs
use Duration