Module: Benchmark

Defined in:
opal/stdlib/benchmark.rb

Class Method Summary collapse

Class Method Details

.measure(&block) ⇒ Object



3
4
5
6
7
# File 'opal/stdlib/benchmark.rb', line 3

def measure(&block)
  start = Time.now
  yield
  Time.now - start
end