You are here

private function CurlMultiHandler::timeToNext in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php \GuzzleHttp\Handler\CurlMultiHandler::timeToNext()
1 call to CurlMultiHandler::timeToNext()
CurlMultiHandler::execute in vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php
Runs until all outstanding connections have completed.

File

vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php, line 185

Class

CurlMultiHandler
Returns an asynchronous response using curl_multi_* functions.

Namespace

GuzzleHttp\Handler

Code

private function timeToNext() {
  $currentTime = microtime(true);
  $nextTime = PHP_INT_MAX;
  foreach ($this->delays as $time) {
    if ($time < $nextTime) {
      $nextTime = $time;
    }
  }
  return max(0, $currentTime - $nextTime);
}