public static function RetryMiddleware::exponentialDelay in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/guzzlehttp/guzzle/src/RetryMiddleware.php \GuzzleHttp\RetryMiddleware::exponentialDelay()
Default exponential backoff delay function.
Parameters
$retries:
Return value
int
File
- vendor/
guzzlehttp/ guzzle/ src/ RetryMiddleware.php, line 48
Class
- RetryMiddleware
- Middleware that retries requests based on the boolean result of invoking the provided "decider" function.
Namespace
GuzzleHttpCode
public static function exponentialDelay($retries) {
return (int) pow(2, $retries - 1);
}