We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a812d7c + e0d1778 commit 82ad86eCopy full SHA for 82ad86e
lib/puppet/util/profiler/aggregate.rb
@@ -72,11 +72,11 @@ def add_time(time)
72
73
class Timer
74
def initialize
75
- @start = Time.now
+ @start = Process.clock_gettime(Process::CLOCK_MONOTONIC, :float_second)
76
end
77
78
def stop
79
- Time.now - @start
+ Process.clock_gettime(Process::CLOCK_MONOTONIC, :float_second) - @start
80
81
82
lib/puppet/util/profiler/wall_clock.rb
@@ -21,11 +21,11 @@ class Timer
21
FOUR_DECIMAL_DIGITS = '%0.4f'
22
23
24
25
26
27
28
- @time = Time.now - @start
+ @time = Process.clock_gettime(Process::CLOCK_MONOTONIC, :float_second) - @start
29
@time
30
31
0 commit comments