src/Viserio/Component/Profiler/Middleware/ProfilerMiddleware.php
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        $server    = $request->getServerParams();
        $startTime = $server['request_time_float'] ?? \microtime(true);

        $response = $handler->handle($request);

        if ($this->profiler === null) {
            return $response;
        }

        $response = $response->withHeader('x-response-time', \sprintf('%2.3fms', (\microtime(true) - $startTime) * 1000));

        // Modify the response to add the Profiler
        return $this->profiler->modifyResponse($request, $response);
    }
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        $server    = $request->getServerParams();
        $startTime = $server['request_time_float'] ?? \microtime(true);

        $response = $handler->handle($request);

        if ($this->profiler === null) {
            return $response;
        }

        $response = $response->withHeader('x-response-time', \sprintf('%2.3fms', (\microtime(true) - $startTime) * 1000));

        // Modify the response to add the Profiler
        return $this->profiler->modifyResponse($request, $response);
    }
{@inheritdoc}