Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Illuminate/Support/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,13 @@ function preg_replace_array($pattern, array $replacements, $subject)
*
* @param int $times
* @param callable $callback
* @param int $sleep
* @param int $sleepMilliseconds
* @param callable|null $when
* @return mixed
*
* @throws \Exception
*/
function retry($times, callable $callback, $sleep = 0, $when = null)
function retry($times, callable $callback, $sleepMilliseconds = 0, $when = null)
{
$attempts = 0;

Expand All @@ -237,8 +237,8 @@ function retry($times, callable $callback, $sleep = 0, $when = null)
throw $e;
}

if ($sleep) {
usleep($sleep * 1000);
if ($sleepMilliseconds) {
usleep($sleepMilliseconds * 1000);
}

goto beginning;
Expand Down