diff --git a/lib/puppet/util/profiler/aggregate.rb b/lib/puppet/util/profiler/aggregate.rb index 20b568ce4e7..f18f52bcde0 100644 --- a/lib/puppet/util/profiler/aggregate.rb +++ b/lib/puppet/util/profiler/aggregate.rb @@ -72,11 +72,11 @@ def add_time(time) class Timer def initialize - @start = Time.now + @start = Process.clock_gettime(Process::CLOCK_MONOTONIC, :float_second) end def stop - Time.now - @start + Process.clock_gettime(Process::CLOCK_MONOTONIC, :float_second) - @start end end end diff --git a/lib/puppet/util/profiler/wall_clock.rb b/lib/puppet/util/profiler/wall_clock.rb index 090c20476a5..8277cba78f9 100644 --- a/lib/puppet/util/profiler/wall_clock.rb +++ b/lib/puppet/util/profiler/wall_clock.rb @@ -21,11 +21,11 @@ class Timer FOUR_DECIMAL_DIGITS = '%0.4f' def initialize - @start = Time.now + @start = Process.clock_gettime(Process::CLOCK_MONOTONIC, :float_second) end def stop - @time = Time.now - @start + @time = Process.clock_gettime(Process::CLOCK_MONOTONIC, :float_second) - @start @time end