改名
This commit is contained in:
@@ -427,6 +427,7 @@ class Request extends HttpService
|
||||
{
|
||||
$httpRequest = new Request();
|
||||
$httpRequest->fd = $request->fd;
|
||||
$httpRequest->startTime = microtime(true);
|
||||
|
||||
$httpRequest->headers = new HttpHeaders();
|
||||
$httpRequest->headers->setHeaders(array_merge($request->header, $request->server));
|
||||
|
||||
@@ -343,10 +343,11 @@ class Response extends HttpService
|
||||
|
||||
/**
|
||||
* @return string
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Pure] public function getRuntime(): string
|
||||
public function getRuntime(): string
|
||||
{
|
||||
return sprintf('%.5f', microtime(TRUE) - $this->startTime);
|
||||
return sprintf('%.5f', microtime(TRUE) - request()->startTime);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user