Skip to content

Commit

Permalink
Use Process.clock_gettime to measure track execution time
Browse files Browse the repository at this point in the history
  • Loading branch information
mrzasa committed Nov 19, 2020
1 parent 387181e commit dc56eaf
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/knapsack/tracker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,7 @@ def report_distributor
end

def now_without_mock_time
if defined?(Timecop)
Time.now_without_mock_time
else
Time.raw_now
end
Process.clock_gettime(Process::CLOCK_MONOTONIC)
end
end
end

0 comments on commit dc56eaf

Please sign in to comment.