Skip to content
Snippets Groups Projects
Unverified Commit 158dd2bd authored by Mathieu Othacehe's avatar Mathieu Othacehe
Browse files

Fix build duration display.

* src/cuirass/templates.scm (build-details): Fix build duration display.
parent 154653b4
No related branches found
No related tags found
No related merge requests found
......@@ -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))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment