Commit e358cf25 authored by Yorick Peterse's avatar Yorick Peterse

Merge branch '69-monotonic-clock' into 'master'

Support old versions of ruby without a monotonic clock

Closes #69

See merge request !161
parents 1e587d3b 8d463160
v5.8.1
- Support old versions of ruby without monotonic clock
v5.8.0
- Fix SSH support for Git for Windows v2.14
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment