Class: Benchmark
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.ms ⇒ Object
41 42 43 |
# File 'lib/core_ext.rb', line 41 def ms 1000 * realtime { yield } end |
Instance Method Details
#realtime ⇒ Object
33 34 35 36 37 38 |
# File 'lib/core_ext.rb', line 33 def realtime r0 = Time.now yield r1 = Time.now r1.to_f - r0.to_f end |