From 128473b95211103456083b44edfb74b722a8553d Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Tue, 11 Jun 2019 21:43:45 +0300 Subject: [PATCH] (0347b34f5) Reduce server CPU usage --- Barotrauma/BarotraumaServer/Source/DebugConsole.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Barotrauma/BarotraumaServer/Source/DebugConsole.cs b/Barotrauma/BarotraumaServer/Source/DebugConsole.cs index c06a6807b..a3d73eb15 100644 --- a/Barotrauma/BarotraumaServer/Source/DebugConsole.cs +++ b/Barotrauma/BarotraumaServer/Source/DebugConsole.cs @@ -167,7 +167,8 @@ namespace Barotrauma RewriteInputToCommandLine(input); } - Thread.Yield(); + //TODO: be more clever about it + Thread.Sleep(10); //sleep for 10ms to not pin the CPU super hard } } catch (ThreadAbortException)