Skip to content

Commit

Permalink
Fix High CPU
Browse files Browse the repository at this point in the history
  • Loading branch information
marticliment committed Oct 14, 2021
1 parent f5830de commit c677ead
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions elevenclock/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

tdir = tempfile.TemporaryDirectory()
tempDir = tdir.name
version = 2.1
version = 2.11
seconddoubleclick = False
showSeconds = 0
mController = MouseController()
Expand Down Expand Up @@ -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()]


Expand Down

0 comments on commit c677ead

Please sign in to comment.