pcacc 4 месяцев назад
Родитель
Сommit
a685a4a50b
2 измененных файлов с 4 добавлено и 4 удалено
  1. 1 1
      app_dongri.py
  2. 3 3
      scriptBase/comon.py

+ 1 - 1
app_dongri.py

@@ -48,7 +48,7 @@ def thread_runTask():
             task_queue.pop()
             last_process = task.name
             task.run()
-            cost_time = time.time() - current_time
+            cost_time = int(time.time() - current_time)
             send_status(f"{task.name} 执行完成,耗时{cost_time}秒")
             myTimeSleep_small()
         else:

+ 3 - 3
scriptBase/comon.py

@@ -175,9 +175,9 @@ def myTimeSleep(curTime , FunStatus=None):
     tmpTime = curTime * 1000
     randomTime = random.randint(int(tmpTime - tmpTime / 9), int(tmpTime + tmpTime / 9)) / 1000
     randomTime = round(randomTime)
-    while randomTime > 10:
-        time.sleep(10)
-        randomTime -= 10
+    while randomTime > 50:
+        time.sleep(50)
+        randomTime -= 50
         showStr = f'下一轮{randomTime}s'
         if FunStatus is not None:
             FunStatus(showStr)