Module: Sequent::Util::Timer
- Included in:
- Migrations::ViewSchema
- Defined in:
- lib/sequent/util/timer.rb
Instance Method Summary collapse
Instance Method Details
#time(msg) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/sequent/util/timer.rb', line 4 def time(msg) start = Time.now yield ensure stop = Time.now seconds = stop - start Sequent.logger.debug("#{msg} in #{seconds} seconds") if seconds > 1 end |