aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-06-24 23:10:13 +0200
committerLudovic Courtès <ludo@gnu.org>2019-06-24 23:10:13 +0200
commitb6f5339dd0180fe73ab70d9c5b851ca0adc04193 (patch)
treeab43e64f5919497c641dd3a915c35483094ee31b
parent38c8437e6eaa281aa03fa6110cffee6431dc9cf1 (diff)
downloadguix-b6f5339dd0180fe73ab70d9c5b851ca0adc04193.tar.gz
guix-b6f5339dd0180fe73ab70d9c5b851ca0adc04193.zip
progress: Call 'time-difference' on times of the same type.
Guile 2.2.5 and 2.9.2 would catch the issue. This is a followup to 88bc3c89bf5145d24c2270d2192b7be547e0024f. * guix/progress.scm (display-download-progress)[elapsed]: Pass 'current-time' the same type as START-TIME.
-rw-r--r--guix/progress.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/guix/progress.scm b/guix/progress.scm
index f150b081d6..349637dbcf 100644
--- a/guix/progress.scm
+++ b/guix/progress.scm
@@ -197,7 +197,9 @@ object) and TRANSFERRED (a total number of bytes) to determine the
throughput."
(define elapsed
(duration->seconds
- (time-difference (current-time time-monotonic) start-time)))
+ (time-difference (current-time (time-type start-time))
+ start-time)))
+
(if (and (number? size) (not (zero? size)))
(let* ((% (* 100.0 (/ transferred size)))
(throughput (/ transferred elapsed))