End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Benchmark#realtime
realtime() { || ... }
lib/benchmark.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/benchmark.rb, line 309
def realtime # :yield:
r0 = Process.clock_gettime(Process::CLOCK_MONOTONIC)
yield
Process.clock_gettime(Process::CLOCK_MONOTONIC) - r0
end
Returns the elapsed real time used to execute the given block.