public final class NanoTimeTokenBucket extends TokenBucket
TokenBucket that uses System.nanoTime as the time source.| Constructor and Description |
|---|
NanoTimeTokenBucket(long _cap,
long _period) |
| Modifier and Type | Method and Description |
|---|---|
long |
currentTime()
The current time in nanos.
|
init, offerpublic long currentTime()
TokenBucketcurrentTime in class TokenBucket