Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-08-09 13:42:42 +0300
committerLin Jen-Shin <godfat@godfat.org>2016-08-09 13:42:42 +0300
commit5643cd6b497c2850fb585cf263d3019953c282f5 (patch)
tree1137ab93e279fa2ef31525b41b8a19ff60c55350 /app/helpers/time_helper.rb
parent551ffc0a4d25a381e9f8f6a8d6f2793bb87f3145 (diff)
Show wall-clock time when showing pipeline instead of:
cumulative builds time. Closes #17007
Diffstat (limited to 'app/helpers/time_helper.rb')
-rw-r--r--app/helpers/time_helper.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/helpers/time_helper.rb b/app/helpers/time_helper.rb
index 790001222f1..a031abb8676 100644
--- a/app/helpers/time_helper.rb
+++ b/app/helpers/time_helper.rb
@@ -17,6 +17,11 @@ module TimeHelper
def duration_in_numbers(finished_at, started_at)
interval = interval_in_seconds(started_at, finished_at)
+
+ duration_in_numbers_from_interval(interval)
+ end
+
+ def duration_in_numbers_from_interval(interval)
time_format = interval < 1.hour ? "%M:%S" : "%H:%M:%S"
Time.at(interval).utc.strftime(time_format)