Method: Alien::AlienBlockTimer#initialize
- Defined in:
- lib/alien/alienblocktimer.rb
#initialize(description = "", &block) ⇒ AlienBlockTimer
Setup the timer and pass in an optional description. If there is an associated block with the call, execute a timing measurment.
70 71 72 73 74 75 76 |
# File 'lib/alien/alienblocktimer.rb', line 70 def initialize (description="",&block) @t1=Time.now @measurement = "Timer initialized." unless block.nil? measure(description){yield} end end |