Lines
n/a
0 / 0
Functions and Methods
n/a
0 / 0
Classes and Traits
n/a
0 / 0
| Name | Lines | Functions and Methods | CRAP | Classes and Traits | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | <?php | |
| 2 | ||
| 3 | declare(strict_types=1); | |
| 4 | ||
| 5 | namespace Stewart\Contracts\Time; | |
| 6 | ||
| 7 | use Closure; | |
| 8 | ||
| 9 | interface Timers | |
| 10 | { | |
| 11 | /** @param Closure(): void $callback */ | |
| 12 | public function startTimer(Duration $delay, Closure $callback): TimerHandle; | |
| 13 | ||
| 14 | // Only the first resolve() or fail() counts; the closure $arm returns runs once the wait ends, however it ends. | |
| 15 | /** | |
| 16 | * @template T | |
| 17 | * @param Closure(PendingWait<T>): (Closure(): void) $arm | |
| 18 | * @return T|null | |
| 19 | */ | |
| 20 | public function waitFor(Closure $arm, ?Duration $timeout = null): mixed; | |
| 21 | } |