1 | <?php |
||
13 | class Attempt { |
||
14 | |||
15 | /** |
||
16 | * Execute $callable until $timeout is reached. By doing an attempt each $step milliseconds |
||
17 | * @param Callable $callbale the method to be called, if the result is FALSE, try again until TRUE or timeout reached |
||
18 | * @param integer $timeout timeout in milliseconds |
||
19 | * @param integer $step |
||
20 | * @return mixed first not FALSE result |
||
21 | */ |
||
22 | 26 | public static function make($callbale, $timeout = 2000, $step = 50) |
|
39 | |||
40 | } |
||
41 |