| 1 | <?php |
||
| 17 | final class Timer |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * @var float |
||
| 21 | */ |
||
| 22 | private $start; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Timer constructor. |
||
| 26 | */ |
||
| 27 | 3 | private function __construct(float $start) |
|
| 31 | |||
| 32 | /** |
||
| 33 | * Starts the timer. |
||
| 34 | */ |
||
| 35 | 3 | public static function start(): Timer |
|
| 39 | |||
| 40 | /** |
||
| 41 | * Returns the elapsed time in microseconds. |
||
| 42 | */ |
||
| 43 | public function result(): float |
||
| 47 | } |
||
| 48 |