Closed max-heller closed 4 months ago
Closes #231
Also adds RateLimiter::clock() to access the clock, enabling usages like the following:
RateLimiter::clock()
let clock = FakeClock::new(); let limiter = RateLimiter::new_with_clock(quota, clock); limiter.clock().advance(by);
This would, for instance, enable using a FakeRelativeClock(AtomicU64) instead of having to wrap the counter in an Arc as is currently done.
FakeRelativeClock(AtomicU64)
Arc
Closes #231
Also adds
RateLimiter::clock()
to access the clock, enabling usages like the following:This would, for instance, enable using a
FakeRelativeClock(AtomicU64)
instead of having to wrap the counter in anArc
as is currently done.