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.21.0 lib/puppet/util/watcher/timer.rb
puppet-7.21.0-x86-mingw32 lib/puppet/util/watcher/timer.rb
puppet-7.21.0-x64-mingw32 lib/puppet/util/watcher/timer.rb
puppet-7.21.0-universal-darwin lib/puppet/util/watcher/timer.rb
puppet-7.20.0 lib/puppet/util/watcher/timer.rb
puppet-7.20.0-x86-mingw32 lib/puppet/util/watcher/timer.rb
puppet-7.20.0-x64-mingw32 lib/puppet/util/watcher/timer.rb
puppet-7.20.0-universal-darwin lib/puppet/util/watcher/timer.rb
puppet-7.19.0 lib/puppet/util/watcher/timer.rb
puppet-7.19.0-x86-mingw32 lib/puppet/util/watcher/timer.rb
puppet-7.19.0-x64-mingw32 lib/puppet/util/watcher/timer.rb
puppet-7.19.0-universal-darwin lib/puppet/util/watcher/timer.rb
puppet-7.18.0 lib/puppet/util/watcher/timer.rb
puppet-7.18.0-x86-mingw32 lib/puppet/util/watcher/timer.rb
puppet-7.18.0-x64-mingw32 lib/puppet/util/watcher/timer.rb
puppet-6.28.0 lib/puppet/util/watcher/timer.rb
puppet-7.18.0-universal-darwin lib/puppet/util/watcher/timer.rb
puppet-6.28.0-x86-mingw32 lib/puppet/util/watcher/timer.rb
puppet-6.28.0-x64-mingw32 lib/puppet/util/watcher/timer.rb
puppet-6.28.0-universal-darwin lib/puppet/util/watcher/timer.rb