summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG3
-rw-r--r--VERSION2
-rw-r--r--lib/gitlab_metrics.rb6
3 files changed, 9 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 96e9346..b45b86a 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+v5.8.1
+ - Support old versions of ruby without monotonic clock
+
v5.8.0
- Fix SSH support for Git for Windows v2.14
diff --git a/VERSION b/VERSION
index 11d9efa..1802e77 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5.8.0
+5.8.1
diff --git a/lib/gitlab_metrics.rb b/lib/gitlab_metrics.rb
index b974b8a..413b799 100644
--- a/lib/gitlab_metrics.rb
+++ b/lib/gitlab_metrics.rb
@@ -21,7 +21,11 @@ module GitlabMetrics
#
# Returns the time as a Fixnum.
def self.monotonic_time
- Process.clock_gettime(Process::CLOCK_MONOTONIC, :millisecond)
+ if defined?(Process::CLOCK_MONOTONIC)
+ Process.clock_gettime(Process::CLOCK_MONOTONIC, :millisecond)
+ else
+ Process.clock_gettime(Process::CLOCK_REALTIME, :millisecond)
+ end
end
end