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

time: decide unit using largest value #6714

Merged
merged 1 commit into from Mar 6, 2020
Merged

time: decide unit using largest value #6714

merged 1 commit into from Mar 6, 2020

Conversation

afq984
Copy link
Contributor

@afq984 afq984 commented Mar 5, 2020

Using a unit based on (usr + sys) / 2 could cause one of them to overflow the %6.2F format and mess up alignment. This PR changes it to max(usr, sys).

This PR changes this:

> time sleep 0

________________________________________________________
Executed in    1.62 millis    fish           external 
   usr time  1622.00 micros  409.00 micros  1213.00 micros 
   sys time   50.00 micros   50.00 micros    0.00 micros

to this:

> time sleep 0

________________________________________________________
Executed in    1.90 millis    fish           external 
   usr time    1.43 millis    0.00 micros    1.43 millis 
   sys time    0.52 millis  522.00 micros    0.00 millis

@faho faho added this to the fish 3.2.0 milestone Mar 6, 2020
@faho faho merged commit f0d42ea into fish-shell:master Mar 6, 2020
@faho
Copy link
Member

faho commented Mar 6, 2020

Yeah, that's better! Thanks, merged!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants