mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-06-15 01:04: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_start === false) global $l_start;
|
||||||
if ($l_time === false) global $l_time;
|
if ($l_time === false) global $l_time;
|
||||||
|
|
||||||
$l_time = explode(' ', microtime());
|
$l_time = microtime(true);
|
||||||
$l_finish = $l_time[1] + $l_time[0];
|
return round(($l_time - $l_start), 4);
|
||||||
return round(($l_finish - $l_start), 4);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
<footer>
|
<footer>
|
||||||
© Znote AAC.
|
© Znote AAC.
|
||||||
<?php
|
<?php
|
||||||
$time = microtime();
|
$finish = microtime(true);
|
||||||
$time = explode(' ', $time);
|
|
||||||
$time = $time[1] + $time[0];
|
|
||||||
$finish = $time;
|
$finish = $time;
|
||||||
$total_time = round(($finish - $start), 4);
|
$total_time = round(($finish - $start), 4);
|
||||||
echo 'Server date and clock is: '. getClock(false, true) .' Page generated in '. $total_time .' seconds. ';
|
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.');
|
<?php if (version_compare(phpversion(), '5.6', '<')) die('PHP version 5.6 or higher is required.');
|
||||||
|
|
||||||
$l_time = microtime();
|
$l_time = microtime(true);
|
||||||
$l_time = explode(' ', $l_time);
|
|
||||||
$l_time = $l_time[1] + $l_time[0];
|
|
||||||
$l_start = $l_time;
|
$l_start = $l_time;
|
||||||
|
|
||||||
function elapsedTime($l_start = false, $l_time = false) {
|
function elapsedTime($l_start = false, $l_time = false) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user