mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
改进THINK_START_TIME和时间计算
This commit is contained in:
2
base.php
2
base.php
@@ -10,7 +10,7 @@
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
define('THINK_VERSION', '5.0.0 RC4');
|
||||
define('THINK_START_TIME', number_format(microtime(true), 8, '.', ''));
|
||||
define('THINK_START_TIME', microtime(true));
|
||||
define('THINK_START_MEM', memory_get_usage());
|
||||
define('EXT', '.php');
|
||||
define('DS', DIRECTORY_SEPARATOR);
|
||||
|
||||
@@ -53,7 +53,7 @@ class Console
|
||||
return false;
|
||||
}
|
||||
// 获取基本信息
|
||||
$runtime = number_format(microtime(true), 8, '.', '') - THINK_START_TIME;
|
||||
$runtime = round(microtime(true) - THINK_START_TIME, 20);
|
||||
$reqs = number_format(1 / $runtime, 2);
|
||||
$mem = number_format((memory_get_usage() - THINK_START_MEM) / 1024, 2);
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ class Html
|
||||
return false;
|
||||
}
|
||||
// 获取基本信息
|
||||
$runtime = number_format(microtime(true), 8, '.', '') - THINK_START_TIME;
|
||||
$runtime = round(microtime(true) - THINK_START_TIME, 20);
|
||||
$reqs = number_format(1 / $runtime, 2);
|
||||
$mem = number_format((memory_get_usage() - THINK_START_MEM) / 1024, 2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user