| Total Complexity | 3 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | class JpgTimer |
||
| 16 | { |
||
| 17 | private $start; |
||
| 18 | private $idx; |
||
| 19 | |||
| 20 | public function __construct() |
||
| 21 | { |
||
| 22 | $this->idx = 0; |
||
| 23 | } |
||
| 24 | |||
| 25 | // Push a new timer start on stack |
||
| 26 | public function Push() |
||
| 27 | { |
||
| 28 | list($ms, $s) = explode(' ', microtime()); |
||
| 29 | $this->start[$this->idx++] = floor($ms * 1000) + 1000 * $s; |
||
| 30 | } |
||
| 31 | |||
| 32 | // Pop the latest timer start and return the diff with the |
||
| 33 | // current time |
||
| 34 | public function Pop() |
||
| 42 | } |
||
| 43 | } // @class |
||
| 44 |