src/Runtime/Darwin/Boottime.php 1 location
|
@@ 8-18 (lines=11) @@
|
5 |
|
use DateTime; |
6 |
|
use Uptime\Runtime\RuntimeInterface; |
7 |
|
|
8 |
|
class Boottime implements RuntimeInterface |
9 |
|
{ |
10 |
|
public function read(RuntimeInterface $uptime = null) |
11 |
|
{ |
12 |
|
$uptime = $uptime ? $uptime : new Uptime(); |
13 |
|
$time = new DateTime('now'); |
14 |
|
$time->modify(sprintf('- %d seconds', $uptime->read())); |
15 |
|
|
16 |
|
return $time->getTimestamp(); |
17 |
|
} |
18 |
|
} |
19 |
|
|
src/Runtime/OpenVMS/Boottime.php 1 location
|
@@ 8-18 (lines=11) @@
|
5 |
|
use DateTime; |
6 |
|
use Uptime\Runtime\RuntimeInterface; |
7 |
|
|
8 |
|
class Boottime implements RuntimeInterface |
9 |
|
{ |
10 |
|
public function read(RuntimeInterface $uptime = null) |
11 |
|
{ |
12 |
|
$uptime = $uptime ? $uptime : new Uptime(); |
13 |
|
$time = new DateTime('now'); |
14 |
|
$time->modify(sprintf('- %d seconds', $uptime->read())); |
15 |
|
|
16 |
|
return $time->getTimestamp(); |
17 |
|
} |
18 |
|
} |
19 |
|
|