Sha256: 50663514b9e408beb3f02b4002808df3f6ec5d48c2885d39c2a1d38e2db79f02

Contents?: true

Size: 379 Bytes

Versions: 15

Compression:

Stored size: 379 Bytes

Contents

module Watir
  module Wait
    class Timer

      #
      # Executes given block until it returns true or exceeds timeout.
      # @param [Fixnum] timeout
      # @yield block
      # @api private
      #

      def wait(timeout, &block)
        end_time = ::Time.now + timeout
        yield(block) until ::Time.now > end_time
      end

    end # Timer
  end # Wait
end # Watir

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
watir-webdriver-0.9.9 lib/watir-webdriver/wait/timer.rb
watir-6.0.0.beta5 lib/watir/wait/timer.rb
watir-6.0.0.beta4 lib/watir/wait/timer.rb
watir-6.0.0.beta3 lib/watir/wait/timer.rb
watir-6.0.0.beta2 lib/watir/wait/timer.rb
watir-6.0.0.beta1 lib/watir/wait/timer.rb
watir-webdriver-0.9.3 lib/watir-webdriver/wait/timer.rb
watir-webdriver-0.9.2 lib/watir-webdriver/wait/timer.rb
watir-webdriver-0.9.1 lib/watir-webdriver/wait/timer.rb
watir-webdriver-0.9.0 lib/watir-webdriver/wait/timer.rb
watir-webdriver-0.8.0 lib/watir-webdriver/wait/timer.rb
watir-webdriver-0.7.0 lib/watir-webdriver/wait/timer.rb
watir-webdriver-0.6.11 lib/watir-webdriver/wait/timer.rb
watir-webdriver-0.6.10 lib/watir-webdriver/wait/timer.rb
watir-webdriver-0.6.9 lib/watir-webdriver/wait/timer.rb