mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-11 20:58:19 +08:00
Opt: Increase nemu_ipc timeout to 0.15s for slow PCs
This commit is contained in:
@@ -288,7 +288,9 @@ class NemuIpcImpl:
|
||||
asyncio.TimeoutError: If function call timeout
|
||||
"""
|
||||
func_wrapped = partial(func, *args, **kwargs)
|
||||
result = await asyncio.wait_for(self._ev.run_in_executor(None, func_wrapped), timeout=0.05)
|
||||
# Increased timeout for slow PCs
|
||||
# Default screenshot interval is 0.2s, so a 0.15s timeout would have a fast retry without extra time costs
|
||||
result = await asyncio.wait_for(self._ev.run_in_executor(None, func_wrapped), timeout=0.15)
|
||||
return result
|
||||
|
||||
def ev_run_sync(self, func, *args, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user