mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-04-22 16:28: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
|
asyncio.TimeoutError: If function call timeout
|
||||||
"""
|
"""
|
||||||
func_wrapped = partial(func, *args, **kwargs)
|
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
|
return result
|
||||||
|
|
||||||
def ev_run_sync(self, func, *args, **kwargs):
|
def ev_run_sync(self, func, *args, **kwargs):
|
||||||
|
|||||||
Reference in New Issue
Block a user