From 11c09e4c5c1df7ef738d089b4a7e172ff15c7259 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 20 Feb 2013 17:07:20 +0100 Subject: [PATCH] Always show the build duration (using the cached build if necessary) --- src/root/build.tt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/root/build.tt b/src/root/build.tt index 79f620b8..4c8ceba5 100644 --- a/src/root/build.tt +++ b/src/root/build.tt @@ -111,12 +111,13 @@ Cached from: [% INCLUDE renderFullBuildLink build=cachedBuild %] - [% ELSE %] - - Duration: - [% INCLUDE renderDuration duration = build.stoptime - build.starttime %]; finished at [% INCLUDE renderDateTime timestamp = build.stoptime %] - [% END %] + + Duration: + [% actualBuild = build.iscachedbuild ? cachedBuild : build; + INCLUDE renderDuration duration = actualBuild.stoptime - actualBuild.starttime %]; finished at [% INCLUDE renderDateTime timestamp = actualBuild.stoptime + %] + [% IF log_exists(build.drvpath) %] Logfile: