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

human readable RATE and ETA #196

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

JiPaix
Copy link

@JiPaix JiPaix commented Jul 21, 2020

ETA formating is day hour minute s here are some examples :

1 hour 35 minutes 7s
2 hours 1 minute
1 day 20 hours 43 minutes 38s

useless word are omitted ("0" day/min/s won't be shown) and automatically add plurals
https://github.com/JiPaix/node-progress/blob/b624fdd2b9b36b2094272d02a5aa879379fd412f/lib/node-progress.js#L255-L258

RATE formating is unit/s here some examples:

810 B/s
230.84 kB/s
15.3 MB/s
2 GB/s
1 TB/s

https://github.com/JiPaix/node-progress/blob/b624fdd2b9b36b2094272d02a5aa879379fd412f/lib/node-progress.js#L237

JiPaix added 4 commits July 19, 2020 04:28
- parseInt(ms) when ms < 1000 (avoid stuff like '950.195985641978315ms')
- display 'done' when ms === 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant