2
0
mirror of https://github.com/mbusb/multibootusb synced 2024-11-01 15:40:16 +00:00

greatly reduce CPU usage

This commit is contained in:
Alin Trăistaru 2017-04-24 20:18:10 +03:00
parent 670cdbd4d1
commit a0dd6438c5

View File

@ -686,6 +686,7 @@ class GuiInstallProgress(QtCore.QThread):
if not self.thread.isFinished() and config.percentage == 100:
config.status_text = "Status: Please wait..."
self.status.emit("Status: Please wait...")
time.sleep(0.1)
self.update.emit(100)
self.update.emit(0)
@ -718,11 +719,14 @@ class GuiUninstallProgress(QtCore.QThread):
def run(self):
self.thread.start()
while self.thread.isRunning():
self.update.emit(config.percentage)
self.status.emit(config.status_text)
if not self.thread.isFinished() and config.percentage == 100:
config.status_text = "Please wait..."
time.sleep(0.1)
self.update.emit(100)
self.update.emit(0)
config.percentage = 0
@ -764,6 +768,7 @@ class DD_Progress(QtCore.QThread):
if not self.thread.isFinished() and config.percentage == 100:
config.imager_status_text = ""
self.status.emit("Please wait...")
time.sleep(0.1)
self.update.emit(100)
self.update.emit(0)