# File lib/facet/timelimit.rb, line 67 def start @current = Thread.current @timer_thread = Thread.fork { sleep @sec if @on_timeout then @on_timeout.call @sec else @current.raise TimeoutError, "#{@sec} seconds past" end } if iterator? then begin yield ensure stop end else @sec end end