Simply record the time from entering `main` to start listening sockets.
main_config_reloader.reset();
            access_control.stopPeriodicReloading();
            is_cancelled = true;
            LOG_DEBUG(log, "Waiting for current connections to close.");
            size_t current_connections = 0;
            {
                std::lock_guard lock(servers_lock);
                for (auto & server : servers)
                {
                    server.stop();
                    current_connections += server.currentConnections();
                }
            }
            if (current_connections)
                LOG_INFO(log, "Closed all listening sockets. Waiting for {} outstanding connections.", current_connections);
            else
                LOG_INFO(log, "Closed all listening sockets.");
            
            if (!config().getBool("shutdown_wait_unfinished_queries", false))
                global_context->getProcessList().killAllQueries();
            if (current_connections)
                current_connections = waitServersToFinish(servers, config().getInt("shutdown_wait_unfinished", 5));
            if (current_connections)
                LOG_INFO(log, "Closed connections. But {} remain."
                    " Tip: To increase wait time add to config: <shutdown_wait_unfinished>60</shutdown_wait_unfinished>", current_connections);
            else
                LOG_INFO(log, "Closed connections.");