From 1d3b3a2261153126832bab4276677cab6e262ed2 Mon Sep 17 00:00:00 2001 From: Ryo Nakamura Date: Wed, 5 Apr 2023 19:07:10 +0900 Subject: main: add a white space to the elapsed time output It adjusts the position of XX:XX in elapsed timeou output. --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/main.c b/src/main.c index 2866a18..446ecf7 100644 --- a/src/main.c +++ b/src/main.c @@ -431,7 +431,7 @@ char *calculate_eta(size_t remain, size_t diff, struct timeval *b, struct timeva if (diff == 0) snprintf(buf, sizeof(buf), "--:-- ETA"); else if (final) { - snprintf(buf, sizeof(buf), "%02d:%02d ", + snprintf(buf, sizeof(buf), "%02d:%02d ", (int)(floor(elapsed / 60)), (int)round(elapsed) % 60); } else { eta = remain / (diff / elapsed); -- cgit v1.2.3