diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-08-09 18:42:42 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-08-09 18:42:42 +0800 |
commit | 5643cd6b497c2850fb585cf263d3019953c282f5 (patch) | |
tree | 1137ab93e279fa2ef31525b41b8a19ff60c55350 /app/helpers/time_helper.rb | |
parent | 551ffc0a4d25a381e9f8f6a8d6f2793bb87f3145 (diff) | |
download | gitlab-ce-5643cd6b497c2850fb585cf263d3019953c282f5.tar.gz |
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.rb | 5 |
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) |