Sha256: effa76e65bb8e8f61cce9cd77da3dd0c3087fc23fc2b5a4e5148adcc13799ba4
Contents?: true
Size: 453 Bytes
Versions: 40
Compression:
Stored size: 453 Bytes
Contents
module Cistern module WaitFor def self.wait_for(timeout = Cistern.timeout, interval = Cistern.poll_interval, &block) duration = 0 start = Time.now until yield || duration > timeout sleep(interval.to_f) duration = Time.now - start end if duration > timeout false else { :duration => duration } end end def self.wait_for!(*arg) wait_for end end end
Version data entries
40 entries across 40 versions & 1 rubygems