lib/suo/client/base.rb in suo-0.3.4 vs lib/suo/client/base.rb in suo-0.4.0
- old
+ new
@@ -130,13 +130,13 @@
def synchronize
mon_synchronize { yield }
end
def retry_with_timeout
- start = Time.now.to_f
+ start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
retry_count.times do
- elapsed = Time.now.to_f - start
+ elapsed = Process.clock_gettime(Process::CLOCK_MONOTONIC) - start
break if elapsed >= options[:acquisition_timeout]
synchronize do
yield
end