We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c488165 commit 3de4d2aCopy full SHA for 3de4d2a
spec/ruby/library/socket/fixtures/classes.rb
@@ -73,10 +73,10 @@ def self.each_ip_protocol
73
74
def self.loop_with_timeout(timeout = 5)
75
require 'timeout'
76
- time = Time.now
+ time = Process.clock_gettime(Process::CLOCK_MONOTONIC)
77
78
loop do
79
- if Time.now - time >= timeout
+ if Process.clock_gettime(Process::CLOCK_MONOTONIC) - time >= timeout
80
raise TimeoutError, "Did not succeed within #{timeout} seconds"
81
end
82
0 commit comments