class Puppet::Util::Profiler::WallClock::Timer

Constants

FOUR_DECIMAL_DIGITS

Public Class Methods

new() click to toggle source
   # File lib/puppet/util/profiler/wall_clock.rb
22 def initialize
23   @start = Time.now
24 end

Public Instance Methods

stop() click to toggle source
   # File lib/puppet/util/profiler/wall_clock.rb
26 def stop
27   @time = Time.now - @start
28   @time
29 end
to_s() click to toggle source
   # File lib/puppet/util/profiler/wall_clock.rb
31 def to_s
32   format(FOUR_DECIMAL_DIGITS, @time)
33 end