class Object

Public Instance Methods

bm(label) { || ... } click to toggle source
# File lib/test.rb, line 6
def bm(label)
  t = Time.now.to_f
  yield
  d = (Time.now.to_f - t) * 1000
  puts "#{label}: #{d.round(2)}ms"
end