Class: Benchmark
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.ms ⇒ Object
16 17 18 |
# File 'lib/active_support/core_ext/benchmark.rb', line 16 def ms 1000 * realtime { yield } end |
Instance Method Details
#realtime ⇒ Object
8 9 10 11 12 13 |
# File 'lib/active_support/core_ext/benchmark.rb', line 8 def realtime r0 = Time.now yield r1 = Time.now r1.to_f - r0.to_f end |