mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-06-14 16:54:30 +02:00
microtime as float (#502)
This commit is contained in:
parent
4fb06fb4e5
commit
6d402cef28
@ -7,9 +7,8 @@ if (!function_exists("elapsedTime")) {
|
||||
if ($l_start === false) global $l_start;
|
||||
if ($l_time === false) global $l_time;
|
||||
|
||||
$l_time = explode(' ', microtime());
|
||||
$l_finish = $l_time[1] + $l_time[0];
|
||||
return round(($l_finish - $l_start), 4);
|
||||
$l_time = microtime(true);
|
||||
return round(($l_time - $l_start), 4);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,11 +1,9 @@
|
||||
<footer>
|
||||
© Znote AAC.
|
||||
<?php
|
||||
$time = microtime();
|
||||
$time = explode(' ', $time);
|
||||
$time = $time[1] + $time[0];
|
||||
$finish = microtime(true);
|
||||
$finish = $time;
|
||||
$total_time = round(($finish - $start), 4);
|
||||
echo 'Server date and clock is: '. getClock(false, true) .' Page generated in '. $total_time .' seconds. ';
|
||||
?>
|
||||
</footer>
|
||||
</footer>
|
||||
|
@ -1,8 +1,6 @@
|
||||
<?php if (version_compare(phpversion(), '5.6', '<')) die('PHP version 5.6 or higher is required.');
|
||||
|
||||
$l_time = microtime();
|
||||
$l_time = explode(' ', $l_time);
|
||||
$l_time = $l_time[1] + $l_time[0];
|
||||
$l_time = microtime(true);
|
||||
$l_start = $l_time;
|
||||
|
||||
function elapsedTime($l_start = false, $l_time = false) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user