benchmark.rb: Process::CLOCK_MONOTONIC_RAW may be unavailable
* lib/benchmark.rb (BENCHMARK_CLOCK): Process::CLOCK_MONOTONIC_RAW is not supported on old linux. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d723b93038
commit
cf990c5ace
@ -272,7 +272,8 @@ module Benchmark
|
||||
|
||||
# :stopdoc:
|
||||
case
|
||||
when defined?(Process::CLOCK_MONOTONIC_RAW)
|
||||
when defined?(Process::CLOCK_MONOTONIC_RAW) and
|
||||
(Process.clock_gettime(Process::CLOCK_MONOTONIC_RAW) rescue false)
|
||||
BENCHMARK_CLOCK = Process::CLOCK_MONOTONIC_RAW
|
||||
when defined?(Process::CLOCK_MONOTONIC)
|
||||
BENCHMARK_CLOCK = Process::CLOCK_MONOTONIC
|
||||
|
Loading…
x
Reference in New Issue
Block a user