1 | <?php |
||
12 | class CBench |
||
13 | { |
||
14 | public $start; |
||
15 | public $stop; |
||
16 | |||
17 | /** |
||
18 | * CBench constructor. |
||
19 | */ |
||
20 | public function __construct() |
||
25 | |||
26 | /** |
||
27 | * @return float |
||
28 | */ |
||
29 | private function getMicroTime() |
||
35 | |||
36 | /** |
||
37 | * start Benchmark |
||
38 | */ |
||
39 | public function start() |
||
43 | |||
44 | /** |
||
45 | * stop Benchmark |
||
46 | */ |
||
47 | public function stop() |
||
51 | |||
52 | /** |
||
53 | * diff between stop and start value |
||
54 | * |
||
55 | * @return int |
||
56 | */ |
||
57 | public function diff() |
||
61 | |||
62 | /** |
||
63 | * @return float |
||
64 | */ |
||
65 | public function runTime() |
||
69 | } |
||
70 |