I want to make a simple script to check the time that the computer takes to execute it. I already built it with PyQt and made a curious loop using QTimer. Now I need to "do" part. What commands can I use only to make the computer work a little, so that I can find the time and compare with other computers?
Here is my code so you can better understand:
self.Tempo = QtCore.QTimer(None) self.Cron = QtCore.QTime(0,0,0,0) def begin(): self.Cron.start() self.Tempo.singleShot(999, update) def update(): if self.lcdNumber.value() == 10: finish() else: self.lcdNumber.display(self.lcdNumber.value()+1)
source share