[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Ludovic Courtès |
Date: |
Mon, 8 Jul 2024 11:24:30 -0400 (EDT) |
branch: main
commit 0e31e35b708170a679316c71a15d3b877121db5e
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Mon Jul 8 10:53:07 2024 +0200
templates: Don’t display negative duration on build page.
* src/cuirass/templates.scm (build-details): Check that end time is
greater than start time.
---
src/cuirass/templates.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/cuirass/templates.scm b/src/cuirass/templates.scm
index d5c79f3..e2151f2 100644
--- a/src/cuirass/templates.scm
+++ b/src/cuirass/templates.scm
@@ -801,10 +801,10 @@ the existing SPEC otherwise."
(start (build-start-time build))
(stop (build-completion-time build)))
(cond
- ((and (> start 0) (> stop 0))
+ ((and (> start 0) (> stop 0) (> stop start))
(string-append (number->string (- stop start))
" seconds"))
- ((> start 0)
+ ((and (> start 0) (> timestamp start))
(string-append (number->string (- timestamp start))
" seconds"))
(else "—")))))