| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 12 | public function read(RuntimeInterface $boottime = null) |
||
| 13 | { |
||
| 14 | $boottime = $boottime ? $boottime : new Boottime(); |
||
| 15 | $now = new DateTime('now'); |
||
| 16 | $interval = $now->diff( new DateTime( '@' . $boottime->read() ) ); |
||
| 17 | |||
| 18 | return ($interval->y * 365 * 24 * 60 * 60) + |
||
| 19 | ($interval->m * 30 * 24 * 60 * 60) + |
||
| 20 | ($interval->d * 24 * 60 * 60) + |
||
| 21 | ($interval->h * 60 * 60) + |
||
| 22 | ($interval->i * 60) + |
||
| 23 | ($interval->s); |
||
| 24 | } |
||
| 25 | } |
||
| 26 |