From 95492e28638a57304ce8d9b2ab7182d5761c1cfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Fri, 19 Nov 2021 11:25:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- function.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/function.php b/function.php index 838923fc..1133c01d 100644 --- a/function.php +++ b/function.php @@ -17,6 +17,7 @@ use Kiri\Exception\ConfigException; use Kiri\Exception\NotFindClassException; use Kiri\Kiri; use Psr\Log\LoggerInterface; +use Server\ServerManager; use Swoole\Process; use Swoole\WebSocket\Server; @@ -156,11 +157,7 @@ if (!function_exists('now')) { */ function now(): string { - $replace = str_replace(time() . '.', '', (string)microtime(true)); - - $sprintf = sprintf('%04d', $replace); - - return date('Y-m-d H:i:s') . '.' . $sprintf; + return date('Y-m-d H:i:s') . '.' . str_replace(time() . '.', '', (string)microtime(true)); } }