Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

post_screencap获取截图的耗时太长 #497

Open
SCzfdf opened this issue Dec 24, 2024 · 1 comment
Open

post_screencap获取截图的耗时太长 #497

SCzfdf opened this issue Dec 24, 2024 · 1 comment

Comments

@SCzfdf
Copy link

SCzfdf commented Dec 24, 2024

经过日志打印发现每次执行间隔在400毫秒左右. 请问这正常吗?
我现在是使用python执行, 如果换其他语言执行速度会不会快一些
以下是定义的流水线和触发器.

pipeline

"screenshot": {
        "action": "Custom",
        "custom_action": "screenshot_action",
        "pre_delay": 0,
        "post_delay": 0
    },

python_action

class ScreenshotAction(CustomAction):

    def run(self,
            context: Context,
            argv: CustomAction.RunArg) -> bool:
        """
        截图线程
        """
        img = context.tasker.controller.post_screencap().wait().get()
        logging.debug("ScreenshotAction post_screencap")
        RDContext.set_screenshot(img)

        return True
@MistEO
Copy link
Member

MistEO commented Dec 25, 2024

log发一下,debug/maa.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants