code: public function getEstimate($key, $limit, $milliseconds)
      {
          $key = $this->getStorageKey($key, $limit, $milliseconds); 
          $count = $this->storage->get($key);
          if ($count < $limit) {
              return 0;
          }
  
          return $milliseconds - ((microtime(1) * 1000) % (float) $milliseconds);
      }
docs: Get Estimate (doesn't require lock)
  
  How long would I have to wait to make a request?
  
  @param string $key  - A unique key for what we're throttling
  @param int $limit   - How many are allowed
  @param int $milliseconds - In this many milliseconds
  @return int - the number of milliseconds before this request should be allowed
  to pass