diff --git a/src/root/build.tt b/src/root/build.tt index a9628703..d986421a 100644 --- a/src/root/build.tt +++ b/src/root/build.tt @@ -154,7 +154,7 @@ [% IF build.resultInfo.iscachedbuild %] (cached build) [% ELSE %] - [% build.resultInfo.stoptime - build.resultInfo.starttime %]s + [% INCLUDE renderDuration duration = build.resultInfo.stoptime - build.resultInfo.starttime %] [% END %] @@ -227,12 +227,12 @@ [% IF step.busy == 0 %] - [% step.stoptime - step.starttime %]s + [% INCLUDE renderDuration duration = step.stoptime - step.starttime %] [% ELSE %] [% IF build.finished %] - [% build.resultInfo.stoptime - step.starttime %]s + [% INCLUDE renderDuration duration = build.resultInfo.stoptime - step.starttime %] [% ELSE %] - [% curTime - step.starttime %]s + [% INCLUDE renderDuration duration = curTime - step.starttime %] [% END %] [% END %] diff --git a/src/root/common.tt b/src/root/common.tt index 74535dfa..6bb8f70c 100644 --- a/src/root/common.tt +++ b/src/root/common.tt @@ -44,6 +44,14 @@ [% END %] +[% BLOCK renderDuration -%] +[% IF duration >= 24 * 60 * 60 %][% duration div (24 * 60 * 60) %]d[% END %] +[% IF duration >= 60 * 60 %][% duration div (60 * 60) % 24 %]h[% END %] +[% IF duration >= 60 %][% duration div 60 % 60 %]m[% END %] +[% duration % 60 %]s +[% END %] + + [% BLOCK renderBuildList %] @@ -116,7 +124,7 @@ - +
Total build time:[% totalBuildTime %]s[% INCLUDE renderDuration duration = totalBuildTime %]
Scheduled builds: