else/Ratelimiter/README.md

6 lines
401 B
Markdown
Raw Normal View History

2016-05-21 19:51:36 +00:00
Ratelimiter
===========
Provides a `Ratelimiter` class to regulate timing. Create an instance with the appropriate allowance and timing rules, then just call `limiter.limit()` in your loop.
Note that allowance=10, period=10 is not the same as allowance=1, period=1. The first allows for more "burstiness" because all 10 operations can happen in the first second, as long as you wait for the other 9.