lib/active_merchant/connection.rb in activemerchant-1.73.0 vs lib/active_merchant/connection.rb in activemerchant-1.74.0
- old
+ new
@@ -47,11 +47,11 @@
@proxy_address = nil
@proxy_port = nil
end
def request(method, body, headers = {})
- request_start = Time.now.to_f
+ request_start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
retry_exceptions(:max_retries => max_retries, :logger => logger, :tag => tag) do
begin
info "connection_http_method=#{method.to_s.upcase} connection_uri=#{endpoint}", tag
@@ -87,10 +87,10 @@
result
end
end
ensure
- info "connection_request_total_time=%.4fs" % [Time.now.to_f - request_start], tag
+ info "connection_request_total_time=%.4fs" % [Process.clock_gettime(Process::CLOCK_MONOTONIC) - request_start], tag
end
private
def http
http = Net::HTTP.new(endpoint.host, endpoint.port, proxy_address, proxy_port)