Sha256: 786d4bbdf3093db54ba730830548510c0b11bd483b1b71a03775923c7c092ce2

Contents?: true

Size: 252 Bytes

Versions: 761

Compression:

Stored size: 252 Bytes

Contents

class Puppet::Util::Watcher::Timer
  attr_reader :timeout

  def initialize(timeout)
    @timeout = timeout
  end

  def start
    @start_time = now
  end

  def expired?
    (now - @start_time) >= @timeout
  end

  def now
    Time.now.to_i
  end
end

Version data entries

761 entries across 761 versions & 3 rubygems

Version Path
puppet-7.29.1 lib/puppet/util/watcher/timer.rb
puppet-7.29.1-x86-mingw32 lib/puppet/util/watcher/timer.rb
puppet-7.29.1-x64-mingw32 lib/puppet/util/watcher/timer.rb
puppet-7.29.1-universal-darwin lib/puppet/util/watcher/timer.rb
puppet-7.29.0 lib/puppet/util/watcher/timer.rb
puppet-7.29.0-x86-mingw32 lib/puppet/util/watcher/timer.rb
puppet-7.29.0-x64-mingw32 lib/puppet/util/watcher/timer.rb
puppet-7.29.0-universal-darwin lib/puppet/util/watcher/timer.rb
puppet-7.28.0 lib/puppet/util/watcher/timer.rb
puppet-7.28.0-x86-mingw32 lib/puppet/util/watcher/timer.rb
puppet-7.28.0-x64-mingw32 lib/puppet/util/watcher/timer.rb
puppet-7.28.0-universal-darwin lib/puppet/util/watcher/timer.rb
puppet-7.27.0 lib/puppet/util/watcher/timer.rb
puppet-7.27.0-x86-mingw32 lib/puppet/util/watcher/timer.rb
puppet-7.27.0-x64-mingw32 lib/puppet/util/watcher/timer.rb
puppet-7.27.0-universal-darwin lib/puppet/util/watcher/timer.rb
puppet-7.26.0 lib/puppet/util/watcher/timer.rb
puppet-7.26.0-x86-mingw32 lib/puppet/util/watcher/timer.rb
puppet-7.26.0-x64-mingw32 lib/puppet/util/watcher/timer.rb
puppet-7.26.0-universal-darwin lib/puppet/util/watcher/timer.rb