From c677eadeea77b3d5f804a64ed6b473bc7d024377 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=AD=20Climent?= Date: Thu, 14 Oct 2021 20:21:33 +0200 Subject: [PATCH] Fix High CPU --- elevenclock/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/elevenclock/__init__.py b/elevenclock/__init__.py index f8d6a190..bbcad036 100644 --- a/elevenclock/__init__.py +++ b/elevenclock/__init__.py @@ -13,7 +13,7 @@ tdir = tempfile.TemporaryDirectory() tempDir = tdir.name -version = 2.1 +version = 2.11 seconddoubleclick = False showSeconds = 0 mController = MouseController() @@ -354,14 +354,15 @@ def __init__(self, dpix, dpiy, screen): self.loop = KillableThread(target=self.fivesecsloop, daemon=True) self.loop2 = KillableThread(target=self.refreshProcesses, daemon=True) self.loop.start() - self.loop2.start() + if(getSettings("EnableHideOnRDP")): + self.loop2.start() self.full_screen_rect = (self.screen.geometry().x(), self.screen.geometry().y(), self.screen.geometry().x()+self.screen.geometry().width(), self.screen.geometry().y()+self.screen.geometry().height()) print("Full screen rect: ", self.full_screen_rect) def refreshProcesses(self): while True: - time.sleep(1) + time.sleep(10) self.processes = [p.name() for p in psutil.process_iter()]