| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 48 | public function getDuration($from = Timer::START, $to = Timer::STOP) { |
||
| 49 | $from = $this->getCheckpoint($from); |
||
| 50 | $to = $this->getCheckpoint($to); |
||
| 51 | |||
| 52 | if ($from === null) { |
||
| 53 | return 0; |
||
| 54 | } |
||
| 55 | |||
| 56 | if ($to === null) { |
||
| 57 | $to = microtime(true); |
||
| 58 | } |
||
| 59 | |||
| 60 | return abs($to - $from); |
||
| 61 | } |
||
| 62 | |||
| 91 |