Class: Benchmark

Inherits:
Object show all
Defined in:
lib/active_support/core_ext/benchmark.rb

Class Method Summary collapse

Class Method Details

.realtimeObject



6
7
8
9
10
11
# File 'lib/active_support/core_ext/benchmark.rb', line 6

def realtime
  r0 = Time.now
  yield
  r1 = Time.now
  r1.to_f - r0.to_f
end