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.34.0 lib/puppet/util/watcher/timer.rb
puppet-7.34.0-x86-mingw32 lib/puppet/util/watcher/timer.rb
puppet-7.34.0-x64-mingw32 lib/puppet/util/watcher/timer.rb
puppet-7.34.0-universal-darwin lib/puppet/util/watcher/timer.rb
puppet-7.33.0 lib/puppet/util/watcher/timer.rb
puppet-7.33.0-x86-mingw32 lib/puppet/util/watcher/timer.rb
puppet-7.33.0-x64-mingw32 lib/puppet/util/watcher/timer.rb
puppet-7.33.0-universal-darwin lib/puppet/util/watcher/timer.rb
puppet-7.32.1 lib/puppet/util/watcher/timer.rb
puppet-7.32.1-x86-mingw32 lib/puppet/util/watcher/timer.rb
puppet-7.32.1-x64-mingw32 lib/puppet/util/watcher/timer.rb
puppet-7.32.1-universal-darwin lib/puppet/util/watcher/timer.rb
puppet-7.31.0 lib/puppet/util/watcher/timer.rb
puppet-7.31.0-x86-mingw32 lib/puppet/util/watcher/timer.rb
puppet-7.31.0-x64-mingw32 lib/puppet/util/watcher/timer.rb
puppet-7.31.0-universal-darwin lib/puppet/util/watcher/timer.rb
puppet-7.30.0 lib/puppet/util/watcher/timer.rb
puppet-7.30.0-x86-mingw32 lib/puppet/util/watcher/timer.rb
puppet-7.30.0-x64-mingw32 lib/puppet/util/watcher/timer.rb
puppet-7.30.0-universal-darwin lib/puppet/util/watcher/timer.rb