| 1 | <?php |
||
| 7 | class TimeoutWait implements WaitStrategy |
||
| 8 | { |
||
| 9 | const TICK = 100; |
||
| 10 | |||
| 11 | /** |
||
| 12 | * Timeout, in milliseconds. |
||
| 13 | * |
||
| 14 | * @var int |
||
| 15 | */ |
||
| 16 | private $timeout; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var callable |
||
| 20 | */ |
||
| 21 | private $callback; |
||
| 22 | |||
| 23 | public function __construct($timeout, callable $callback) |
||
| 28 | |||
| 29 | /** |
||
| 30 | * {@inheritdoc} |
||
| 31 | */ |
||
| 32 | public function wait(Process $process) |
||
| 48 | } |
||
| 49 |