mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 16:04:35 +02:00
Merge pull request #2719 from SaaldjorMike/del-utime-func
Replaced custom utime() function with microtime(true)
This commit is contained in:
+2
-10
@@ -12,15 +12,7 @@
|
||||
*/
|
||||
|
||||
|
||||
function utime() {
|
||||
$time = explode(' ', microtime());
|
||||
$usec = (double) $time[0];
|
||||
$sec = (double) $time[1];
|
||||
return ($sec + $usec);
|
||||
|
||||
}
|
||||
|
||||
$start = utime();
|
||||
$start = microtime(true);
|
||||
|
||||
require_once 'Net/IPv4.php';
|
||||
|
||||
@@ -54,7 +46,7 @@ require 'includes/graphs/graph.inc.php';
|
||||
|
||||
$console_color = new Console_Color2();
|
||||
|
||||
$end = utime();
|
||||
$end = microtime(true);
|
||||
$run = ($end - $start);
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -72,7 +72,7 @@ $config['memcached']['ttl'] = $config['time']['now']+300;
|
||||
|
||||
Plugins::start();
|
||||
|
||||
$runtime_start = utime();
|
||||
$runtime_start = microtime(true);
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -263,7 +263,7 @@ else {
|
||||
</div>
|
||||
<?php
|
||||
|
||||
$runtime_end = utime();
|
||||
$runtime_end = microtime(true);
|
||||
$runtime = $runtime_end - $runtime_start;
|
||||
$gentime = substr($runtime, 0, 5);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user