Sha256: 9b5cb9bac1a511ba4f955b233274fa78a7bba59537b5a4b497c62b764fcb400a
Contents?: true
Size: 507 Bytes
Versions: 5
Compression:
Stored size: 507 Bytes
Contents
module Vx module Lib module Shell class ReadTimeout def initialize(val) @value = val.to_f > 0 ? val.to_f : nil @happened = false @tm = nil end def reset @tm = Time.new if @value end def happened? return true if @happened return false unless @tm @happened = Time.now > (@tm + @value) end def value @value end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems