module Sequent::Util::Timer
Public Instance Methods
Source
# File lib/sequent/util/timer.rb, line 6 def time(msg) start = Time.now yield ensure stop = Time.now seconds = stop - start Sequent.logger.debug("#{msg} in #{seconds} seconds") if seconds > 1 && Sequent.logger.debug? end