module TinyTimer::DSL

User Interface (global convenience methods)

Private Instance Methods

comment(desc='') click to toggle source
# File lib/tiny_timer/dsl.rb, line 17
def comment(desc='')
  timer = TinyTimer::Timer.current_timer
  # TODO: raise exeption if timer is nil
  timer.comment(desc) if timer
end
step(desc='', &block) click to toggle source
# File lib/tiny_timer/dsl.rb, line 11
def step(desc='', &block)
  timer = TinyTimer::Timer.current_timer
  # TODO: raise exeption if timer is nil
  timer.step(desc,&block) if timer
end
timer(desc=nil, &block) click to toggle source
# File lib/tiny_timer/dsl.rb, line 7
def timer(desc=nil, &block)
  TinyTimer::Timer.run_timer(desc, &block)
end