mirror of
git://git.savannah.gnu.org/guix/guix-cuirass.git
synced 2023-12-14 06:03:04 +01:00
Fix build duration display.
* src/cuirass/templates.scm (build-details): Fix build duration display.
This commit is contained in:
parent
154653b4c8
commit
158dd2bd42
|
@ -291,11 +291,17 @@ system whose names start with " (code "guile-") ":" (br)
|
|||
(tr (th "Name")
|
||||
(td ,(assq-ref build #:nix-name)))
|
||||
(tr (th "Duration")
|
||||
(td ,(or (and-let* ((start (assq-ref build #:starttime))
|
||||
(stop (assq-ref build #:stoptime)))
|
||||
(string-append (number->string (- stop start))
|
||||
" seconds"))
|
||||
"—")))
|
||||
(td ,(let ((timestamp (time-second (current-time time-utc)))
|
||||
(start (assq-ref build #:starttime))
|
||||
(stop (assq-ref build #:stoptime)))
|
||||
(cond
|
||||
((and (> start 0) (> stop 0))
|
||||
(string-append (number->string (- stop start))
|
||||
" seconds"))
|
||||
((> start 0)
|
||||
(string-append (number->string (- timestamp start))
|
||||
" seconds"))
|
||||
(else "—")))))
|
||||
(tr (th "Finished")
|
||||
(td ,(if completed?
|
||||
(time->string (assq-ref build #:stoptime))
|
||||
|
|
Loading…
Reference in a new issue