def update(self):
a=0
tot=0
self.load.append(cpu_percent())
for i in range(len(self.load)-1,len(self.load)):
a=a+self.load[i]
tot=tot+1.0
a=a/tot
self.load[len(self.load)-1]=a
self.load.pop(0)
try: #user reported bug, This is a problem with the underlying function.
w_temp=disk_io_counters()[3]/1000
except:
w_temp=0
w_delta=w_temp-self.wait_last
self.wait_last=w_temp
self.wait.append(int(w_delta))
#print(w_delta)
self.wait.pop(0)
self.color.append([255,0,0])
self.color.pop(0)
self.repaint()
评论列表
文章目录