Class: SipoMailer::Timer
- Inherits:
-
Object
- Object
- SipoMailer::Timer
- Defined in:
- lib/sipo_mailer/utils/timer.rb
Class Method Summary collapse
Class Method Details
.elapsed {|block| ... } ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/sipo_mailer/utils/timer.rb', line 3 def self.elapsed(&block) start = Time.now yield(block) finish = Time.now e = (finish - start) * 1000 p "Elapsed time: #{e} ms" end |