mirror of
https://github.com/sheumann/hush.git
synced 2024-08-26 12:29:04 +00:00
progress meter: display >999 hours ETA correctly
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
f836f01cc3
commit
838d4bb0cd
@ -188,8 +188,10 @@ void FAST_FUNC bb_progress_update(bb_progress_t *p,
|
||||
* totalsize * elapsed / transferred - elapsed
|
||||
*/
|
||||
eta = totalsize * elapsed / transferred - elapsed;
|
||||
if (eta >= 1000*60*60)
|
||||
eta = 1000*60*60 - 1;
|
||||
secs = eta % 3600;
|
||||
hours = eta / 3600;
|
||||
fprintf(stderr, "%02u:%02u:%02u ETA", hours, secs / 60, secs % 60);
|
||||
fprintf(stderr, "%3u:%02u:%02u ETA", hours, secs / 60, secs % 60);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user