code: private void acquirePermits(long permits) throws InterruptedException {
      long startMs = System.currentTimeMillis(); //Measure in milliseconds. (Nanoseconds are more precise but expensive and not worth for this case)
      limiter.acquirePermits(permits);
      long permitAcquisitionTime = System.currentTimeMillis() - startMs;
      if (throttledTimer.isPresent()) { // Metrics enabled
        Instrumented.updateTimer(throttledTimer, permitAcquisitionTime, TimeUnit.MILLISECONDS);
      }
      this.throttledTime += permitAcquisitionTime;
    }
docs: Acquire permit along with emitting metrics if enabled.
  @param permits
  @throws InterruptedException