OperationLimiter is a simple time based operation limiter library.
- Limit operation by Second (N times in one second)
- Limit operation by Minute (N times in one minute)
- Limit operation by Hour (N times in one hour)
var operationLimiter = new OperationLimiter(2, OperationLimitType.Minute);
for (int i = 1; i <= 10; i++)
{
Console.WriteLine($"Operation {i}: {DateTime.Now.ToLongTimeString()}");
await operationLimiter.LimitAsync();
}
- Base Release