rate_limit

rate_limit

This is a simple token-butcket style rate limiter

It provides neat features like an estimate of the next block

and possible inverse of the bucket (filling vs draining)

this provides both thread-safe and non-thread-safe versions