diff options
Diffstat (limited to 'admin/api/serverTime.php')
-rw-r--r-- | admin/api/serverTime.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/admin/api/serverTime.php b/admin/api/serverTime.php index d0db5e3..77ba321 100644 --- a/admin/api/serverTime.php +++ b/admin/api/serverTime.php @@ -1,12 +1,12 @@ -<?php - -require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/header.api.php"; - -$str = file_get_contents('/proc/uptime'); -$num = floatval($str); -$secs = fmod($num, 60); $num = intdiv($num, 60); -$mins = $num % 60; $num = intdiv($num, 60); -$hours = $num % 24; $num = intdiv($num, 24); -$days = $num; - +<?php
+
+require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/header.api.php";
+
+$str = file_get_contents('/proc/uptime');
+$num = floatval($str);
+$secs = fmod($num, 60); $num = intdiv($num, 60);
+$mins = $num % 60; $num = intdiv($num, 60);
+$hours = $num % 24; $num = intdiv($num, 24);
+$days = $num;
+
echo($days . " day·s, " . $hours . " hour·s, " . $mins . " minute·s, " . ceil($secs) . " second·s");
\ No newline at end of file |