You are here

public static function RetryMiddleware::exponentialDelay in Auth0 Single Sign On 8.2

Default exponential backoff delay function.

Parameters

int $retries:

Return value

int milliseconds.

File

vendor/guzzlehttp/guzzle/src/RetryMiddleware.php, line 52

Class

RetryMiddleware
Middleware that retries requests based on the boolean result of invoking the provided "decider" function.

Namespace

GuzzleHttp

Code

public static function exponentialDelay($retries) {
  return (int) pow(2, $retries - 1) * 1000;
}