This commit is contained in:
2021-11-19 11:24:08 +08:00
parent 47f1407118
commit d743382868
+3 -2
View File
@@ -17,7 +17,6 @@ use Kiri\Exception\ConfigException;
use Kiri\Exception\NotFindClassException; use Kiri\Exception\NotFindClassException;
use Kiri\Kiri; use Kiri\Kiri;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
use Server\ServerManager;
use Swoole\Process; use Swoole\Process;
use Swoole\WebSocket\Server; use Swoole\WebSocket\Server;
@@ -157,7 +156,9 @@ if (!function_exists('now')) {
*/ */
function now(): string function now(): string
{ {
return date('Y-m-d H:i:s') . '.' . str_replace(time() . '.', '', (string)microtime(true)); $sprintf = sprintf('%04d', microtime(true));
return date('Y-m-d H:i:s') . '.' . str_replace(time() . '.', '', $sprintf);
} }
} }