tng-rails-misc-a#

#

def operation
  s = Time.now

  # your script
  sleep(2)

  e = Time.now
  t = e - s
  sprintf("Elaboration Time: %f", t)
end

>> operation
=> "Elaboration Time: 2.000084"