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.
This commit is contained in:
parent
38c8437e6e
commit
b6f5339dd0
@ -197,7 +197,9 @@ object) and TRANSFERRED (a total number of bytes) to determine the
|
|||||||
throughput."
|
throughput."
|
||||||
(define elapsed
|
(define elapsed
|
||||||
(duration->seconds
|
(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)))
|
(if (and (number? size) (not (zero? size)))
|
||||||
(let* ((% (* 100.0 (/ transferred size)))
|
(let* ((% (* 100.0 (/ transferred size)))
|
||||||
(throughput (/ transferred elapsed))
|
(throughput (/ transferred elapsed))
|
||||||
|
Loading…
Reference in New Issue
Block a user