Stephen Lead wrote:
Like Marvin wrote...
> require 'timeout'
> for i in 1..1000
    begin
      status = Timeout::timeout(60) {
>     b = Firefox.new
>     b.goto "some site"
      #1. perform some processing, which should take less than 60 
seconds
      #2. if the process was successful, write the result to a text file
    rescue Timeout::Error
      #3. if it took too long, abort this iteration, and continue with 
'next i'
      # here you don't have to write anything if you don't want to.
    end
>     b.close
>   }
> end

-- 
Posted via http://www.ruby-forum.com/.