Sha256: 08e844ec8f62b437d0bcfa44eb6e8eb79870052a32752bed213dce010906ea62
Contents?: true
Size: 322 Bytes
Versions: 7
Compression:
Stored size: 322 Bytes
Contents
module Cistern def self.wait_for(timeout=Cistern.timeout, interval=1, &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 end
Version data entries
7 entries across 7 versions & 1 rubygems