rasbt / pyprind

PyPrind - Python Progress Indicator Utility
BSD 3-Clause "New" or "Revised" License
549 stars 65 forks source link

Time in day, hour, min and sec #19

Closed Div44 closed 8 years ago

Div44 commented 8 years ago

For the issue https://github.com/rasbt/pyprind/issues/17 discussing the support for displaying long ETAs in hours and minutes. Added a function _get_time that takes time in seconds and returns a formatted string in the form of day, hour, min and sec.

rasbt commented 8 years ago

Thanks for the pull request, I really appreciate it! I have a few tiny suggestions here:

1) It would be nice to change the ETA output from x days x min x sec to a more consistent representation, e.g., 0:00:00 where h:mm:ss

2) To be consistent with the new ETA interface, it would be nice to also apply the formatting to elapsed[sec]

3) Another consistency change: print Total time elapsed: 0 sec as Total time elapsed: 0:00:00 as well

Let me know if this would be possible for you to implement!

Thanks, Sebastian

Div44 commented 8 years ago

Hi Thanks for the suggestions. I have done some changes to accommodate the suggestions. If you can review the changes and point some more suggestions, I would be happy to accommodate them.

rasbt commented 8 years ago

Thanks, Divyanshu! It's super nice now, I like it a lot!