nl_tokens: Acquires the given number of permits from this { @code RateLimiter } if it can be obtained without exceeding the specified { @code timeout } or returns { @code false } immediately ( without waiting ) if the permits would not have been granted before the timeout expired .
pl_tokens: public boolean tryAcquire ( int permits , long timeout , TimeUnit unit ) { long timeoutMicros = <mask> ( unit . toMicros ( timeout ) , 0 ) ; checkPermits ( permits ) ; long microsToWait ; synchronized ( mutex ( ) ) { long nowMicros = stopwatch . readMicros ( ) ; if ( ! canAcquire ( nowMicros , timeoutMicros ) ) { return false ; } else { microsToWait = reserveAndGetWaitLength ( permits , nowMicros ) ; } } stopwatch . sleepMicrosUninterruptibly ( microsToWait ) ; return true ; }