revert + helper: add function to compute and display time consuming between 2 endpoints.
This commit is contained in:
刘刚
2023-08-10 10:20:58 +08:00
parent 9e09d55644
commit 7a6232fdec
-25
View File
@@ -390,31 +390,6 @@ function formatTime($time, $format = '')
return trim($time);
}
/**
* Display time consuming.
*
* @param string $tag
* @access public
* @return void
*/
function t($tag = '')
{
global $last;
$time = microtime();
if($last)
{
list($lms, $ls) = explode(' ', $last);
list($ms, $s) = explode(' ', $time);
a("$tag: time consuming=" . ($s - $ls + round($ms - $lms, 3)) . 's');
}
else
{
a("$tag: current time={$time}");
}
$last = $time;
}
/**
* Fix for session error.
*