1 | <?php declare(strict_types=1); |
||
8 | abstract class Event extends AbstractEvent |
||
9 | { |
||
10 | /** |
||
11 | * @var RequestInterface |
||
12 | */ |
||
13 | public $request; |
||
14 | |||
15 | /** |
||
16 | * @var float |
||
17 | */ |
||
18 | public $startTime; |
||
19 | |||
20 | /** |
||
21 | * @var float |
||
22 | */ |
||
23 | public $endTime; |
||
24 | |||
25 | /** |
||
26 | * Create a new instance. |
||
27 | * |
||
28 | * @param RequestInterface $request The request instance. |
||
29 | * @param float $startTime The timestamp of the start of the request, with microsecond precision. |
||
30 | * @param float $endTime The timestamp of the end of the request, with microsecond precision. |
||
31 | */ |
||
32 | public function __construct(RequestInterface $request, float $startTime, float $endTime) |
||
38 | |||
39 | /** |
||
40 | * Get total time. |
||
41 | * |
||
42 | * @return float |
||
43 | */ |
||
44 | public function time(): float |
||
48 | } |
||
49 |