From c2cdb24131ad3b1c9f62562561510a931db2b72a Mon Sep 17 00:00:00 2001 From: skilion Date: Sun, 9 Sep 2018 22:11:38 +0200 Subject: [PATCH] fix excessive usage of CPU in monitor mode --- src/main.d | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main.d b/src/main.d index 86c64e5d..ee550ff1 100644 --- a/src/main.d +++ b/src/main.d @@ -155,7 +155,7 @@ int main(string[] args) log.log(e.msg); } }; - if (!downloadOnly) m.init(cfg, verbose); + if (!downloadOnly) m.init(cfg); // monitor loop immutable auto checkInterval = dur!"seconds"(45); auto lastCheckTime = MonoTime.currTime(); @@ -173,9 +173,8 @@ int main(string[] args) } } GC.collect(); - } else { - Thread.sleep(dur!"msecs"(100)); } + Thread.sleep(dur!"msecs"(500)); } }