diff options
Diffstat (limited to 'lib')
-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 36e593518f..bd91a6efe0 100644 --- a/lib/benchmark.rb +++ b/lib/benchmark.rb @@ -304,7 +304,10 @@ module Benchmark # Returns the elapsed real time used to execute the given block. # def realtime(&blk) # :yield: - Benchmark::measure(&blk).real + r0 = Time.now + yield + r1 = Time.now + r1.to_f - r0.to_f end |