From dc56eaf49b838837e74b37e6aa338d699a336107 Mon Sep 17 00:00:00 2001 From: Maciej Rzasa Date: Thu, 19 Nov 2020 16:32:37 +0100 Subject: [PATCH] Use Process.clock_gettime to measure track execution time --- lib/knapsack/tracker.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/knapsack/tracker.rb b/lib/knapsack/tracker.rb index a973238..befbe46 100644 --- a/lib/knapsack/tracker.rb +++ b/lib/knapsack/tracker.rb @@ -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