From 62f2addc577d1a202907527ad3c5a2135b5db0eb Mon Sep 17 00:00:00 2001 From: Brian Potchik Date: Tue, 5 Nov 2024 23:18:48 -0500 Subject: Add delay support to workflow machine. --- python/workflow.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'python') diff --git a/python/workflow.py b/python/workflow.py index 8213a6b6..bf47a41a 100644 --- a/python/workflow.py +++ b/python/workflow.py @@ -715,6 +715,13 @@ class WorkflowMachine: else: return json.loads(core.BNPostWorkflowRequestForBinaryView(self.handle, request)) + def delay(self, duration): + request = json.dumps({"command": "delay", "duration": duration}) + if self.is_function_machine: + return json.loads(core.BNPostWorkflowRequestForFunction(self.handle, request)) + else: + return json.loads(core.BNPostWorkflowRequestForBinaryView(self.handle, request)) + def request(self, request): if self.is_function_machine: return json.loads(core.BNPostWorkflowRequestForFunction(self.handle, request)) -- cgit v1.3.1