This commit is contained in:
恍兮惚兮 2024-06-25 16:26:21 +08:00
parent d23ae16f19
commit 6601c0d3a9
2 changed files with 6 additions and 2 deletions

View File

@ -446,8 +446,11 @@ class texthook(basetext):
_data, tms = self.newline_delaywait.get() _data, tms = self.newline_delaywait.get()
collector.append(_data) collector.append(_data)
now = time.time() targettime = tms + self.config["textthreaddelay"]
time.sleep(min(now - tms, self.config["textthreaddelay"])/1000) sleepdur = targettime - time.time()
sleepdur = max(0, sleepdur)
sleepdur /= 1000
time.sleep(sleepdur)
if not self.newline_delaywait.empty(): if not self.newline_delaywait.empty():
continue continue

View File

@ -289,4 +289,5 @@ if __name__ == "__main__":
subprocess.run(f"{py37Path} -m pip install -r requirements.txt") subprocess.run(f"{py37Path} -m pip install -r requirements.txt")
# 3.8之后会莫名其妙引用这个b东西然后这个b东西会把一堆没用的东西导入进来 # 3.8之后会莫名其妙引用这个b东西然后这个b东西会把一堆没用的东西导入进来
shutil.rmtree(os.path.join(os.path.dirname(py37Path), "Lib\\test")) shutil.rmtree(os.path.join(os.path.dirname(py37Path), "Lib\\test"))
shutil.rmtree(os.path.join(os.path.dirname(py37Path), "Lib\\unittest"))
subprocess.run(f"{py37Path} retrieval.py") subprocess.run(f"{py37Path} retrieval.py")