lib/httpx/resolver.rb in httpx-0.17.0 vs lib/httpx/resolver.rb in httpx-0.18.0
- old
+ new
@@ -24,17 +24,17 @@
@identifier = 1
module_function
def cached_lookup(hostname)
- now = Process.clock_gettime(Process::CLOCK_MONOTONIC)
+ now = Utils.now
@lookup_mutex.synchronize do
lookup(hostname, now)
end
end
def cached_lookup_set(hostname, entries)
- now = Process.clock_gettime(Process::CLOCK_MONOTONIC)
+ now = Utils.now
entries.each do |entry|
entry["TTL"] += now
end
@lookup_mutex.synchronize do
@lookups[hostname] += entries