diff options
Diffstat (limited to 'lib/benchmark.rb')
-rw-r--r-- | lib/benchmark.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/benchmark.rb b/lib/benchmark.rb index 7c03c4a195..87666a61ea 100644 --- a/lib/benchmark.rb +++ b/lib/benchmark.rb @@ -271,7 +271,10 @@ module Benchmark end # :stopdoc: - if defined?(Process::CLOCK_MONOTONIC) + case + when defined?(Process::CLOCK_MONOTONIC_RAW) + BENCHMARK_CLOCK = Process::CLOCK_MONOTONIC_RAW + when defined?(Process::CLOCK_MONOTONIC) BENCHMARK_CLOCK = Process::CLOCK_MONOTONIC else BENCHMARK_CLOCK = Process::CLOCK_REALTIME |