Skip to content

Commit

Permalink
Merge pull request #100 from mrzasa/fix-elaspsed-time
Browse files Browse the repository at this point in the history
Use Process.clock_gettime to measure track execution time
  • Loading branch information
ArturT authored Nov 21, 2020
2 parents 387181e + dc56eaf commit a83445a
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 a83445a

Please sign in to comment.