Rate limiter using token bucket algorithm
Get current token count
Milliseconds until the bucket can admit another job. When maxJobs is provided, report 0 until at least that many tokens have been consumed.
maxJobs
Optional
Try to acquire a token
Rate limiter using token bucket algorithm