<PackageReference Include="Polly" Version="8.9.0" />

Polly.RateLimit.LockFreeTokenBucketRateLimiter

A lock-free token-bucket rate-limiter for a Polly IRateLimitPolicy.
public LockFreeTokenBucketRateLimiter(TimeSpan onePer, long bucketCapacity)

Initializes a new instance of the LockFreeTokenBucketRateLimiter class.

Returns whether the execution is permitted; if not, returns what TimeSpan should be waited before retrying.