Files
music_library/lib/req/rate_limiter/clock.ex
T
2026-03-16 11:21:24 +00:00

11 lines
278 B
Elixir

defmodule Req.RateLimiter.Clock do
@moduledoc """
Behaviour for time operations used by `Req.RateLimiter`.
Allows injecting a fake clock in tests for deterministic throttle assertions.
"""
@callback now() :: integer()
@callback sleep(non_neg_integer()) :: :ok
end