This commit is contained in:
Jerry Yan 2019-04-09 14:23:08 +08:00
parent a6fa88b981
commit 612a9185eb

View File

@ -45,11 +45,9 @@ def getCurrentStatus():
_net = psutil.net_io_counters()
if 60 > (datetime.now() - network["currentTime"]).seconds > 0:
_outSpeed = (_net.bytes_sent - network["out"]["currentByte"])/getTimeDelta(datetime.now(),network["currentTime"])
else:
_outSpeed = 0
if 60 > (datetime.now() - network["currentTime"]).seconds > 0:
_inSpeed = (_net.bytes_recv - network["in"]["currentByte"])/getTimeDelta(datetime.now(),network["currentTime"])
else:
_outSpeed = 0
_inSpeed = 0
updateNetwork()
return {