aboutsummaryrefslogtreecommitdiff
path: root/lib/http/http.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/http/http.ml')
-rw-r--r--lib/http/http.ml4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/http/http.ml b/lib/http/http.ml
index afb2610..ec6cb2c 100644
--- a/lib/http/http.ml
+++ b/lib/http/http.ml
@@ -68,9 +68,9 @@ module Base = struct
| `Post -> Cohttp_async.Client.post ~headers ~body uri
| `Put -> Cohttp_async.Client.put ~headers ~body uri)
>>= process_response path
- in if Int64.(limit.remaining > 0L) then process ()
+ in if limit.remaining > 0 then process ()
else
- let time = Time.(limit.reset |> Int63.of_int64_trunc |> Span.of_int63_seconds |> of_span_since_epoch) in
+ let time = Time.(Span.of_int_sec limit.reset |> of_span_since_epoch) in
Logs.debug (fun m -> m "Rate-limiting [Route: %s] [Duration: %d ms]" path Time.(diff time (Time.now ()) |> Span.to_ms |> Float.to_int) );
Clock.at time >>= process
end