From e1c9beb87227c5fc38be282c86eacaac2f6c60ad Mon Sep 17 00:00:00 2001 From: JerryYan <792602257@qq.com> Date: Wed, 17 Jul 2019 09:50:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E9=AB=98Net=E7=B2=BE=E5=BA=A6?= =?UTF-8?q?=EF=BC=88=E8=99=BD=E7=84=B6=E6=B2=A1=E5=95=A5=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Common.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Common.py b/Common.py index 86c3ed8..e40fcb1 100644 --- a/Common.py +++ b/Common.py @@ -82,9 +82,10 @@ def doClean(_force=False): def getCurrentStatus(): _disk = psutil.disk_usage(".") _mem = psutil.virtual_memory() - _delta= getTimeDelta(datetime.now(),network["currentTime"]) _net = psutil.net_io_counters() + _delta= getTimeDelta(datetime.now(),network["currentTime"]) if 60 > _delta > 0: + _delta = getTimeDelta(datetime.now(), network["currentTime"]) _inSpeed = (_net.bytes_recv - network["in"]["currentByte"]) / _delta _outSpeed = (_net.bytes_sent - network["out"]["currentByte"]) / _delta else: