diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-20 21:38:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-20 21:38:24 +0300 |
commit | 983a0bba5d2a042c4a3bbb22432ec192c7501d82 (patch) | |
tree | b153cd387c14ba23bd5a07514c7c01fddf6a78a0 /lib/gitlab/utils.rb | |
parent | a2bddee2cdb38673df0e004d5b32d9f77797de64 (diff) |
Add latest changes from gitlab-org/gitlab@12-10-stable-ee
Diffstat (limited to 'lib/gitlab/utils.rb')
-rw-r--r-- | lib/gitlab/utils.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/utils.rb b/lib/gitlab/utils.rb index ad6b213bb50..2e8a3ca4242 100644 --- a/lib/gitlab/utils.rb +++ b/lib/gitlab/utils.rb @@ -122,6 +122,10 @@ module Gitlab bytes.to_f / Numeric::MEGABYTE end + def ms_to_round_sec(ms) + (ms.to_f / 1000).round(2) + end + # Used in EE # Accepts either an Array or a String and returns an array def ensure_array_from_string(string_or_array) |