diff --git a/lib/benchmark.rb b/lib/benchmark.rb index 9f43255..5072bdc 100644 --- a/lib/benchmark.rb +++ b/lib/benchmark.rb @@ -307,6 +307,10 @@ def measure(label = "") # :yield: # # Returns the elapsed real time used to execute the given block. + # The unit of time is seconds. + # + # Benchmark.realtime { "a" * 1_000_000_000 } + # #=> 0.5098029999935534 # def realtime # :yield: r0 = Process.clock_gettime(Process::CLOCK_MONOTONIC)