From 3c6ca01df8f6f0880ed072405ccaa8d1db09dc68 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Thu, 19 Dec 2024 02:37:13 +0300 Subject: [PATCH] fix --- src/ServerMainloop.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ServerMainloop.cpp b/src/ServerMainloop.cpp index 1f496a515..2c88a06b2 100644 --- a/src/ServerMainloop.cpp +++ b/src/ServerMainloop.cpp @@ -41,6 +41,7 @@ void ServerMainloop::run() { double delta = targetDelta; auto begin = system_clock::now(); auto startupTime = begin; + while (process->isActive()) { if (engine.isQuitSignal()) { process->terminate(); @@ -65,7 +66,7 @@ void ServerMainloop::run() { auto end = system_clock::now(); platform::sleep(targetDelta * 1000 - duration_cast(end - begin).count() / 1000); - begin = end; + begin = system_clock::now(); } } logger.info() << "test finished";