This commit is contained in:
2021-08-01 16:08:32 +08:00
parent 3d190ae839
commit 08a5361321
2 changed files with 4 additions and 2 deletions
+3 -2
View File
@@ -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);
}
}