From 91a9b6a96ddf6bb9808899b5644849e327eabdb0 Mon Sep 17 00:00:00 2001 From: Byeonggil Jun Date: Thu, 5 Feb 2026 13:19:58 -0700 Subject: [PATCH] Add a class for the function `update_deadline` --- LinguaFrancaBase/classes.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/LinguaFrancaBase/classes.py b/LinguaFrancaBase/classes.py index 5bb82c7..84a55d5 100644 --- a/LinguaFrancaBase/classes.py +++ b/LinguaFrancaBase/classes.py @@ -27,3 +27,14 @@ def check_deadline(self, invoke_deadline_handler=True): # This idiom is used to invoke C functions bound to the main module and defined # pythontarget.c. return self.lf_module().check_deadline(self, invoke_deadline_handler) + def update_deadline(self, updated_deadline=0): + """ + Update the deadline of the currently executing reaction. + + Args: + invoke_deadline_handler (interval_t): The updated deadline. + """ + # Call the C function through the binding. + # This idiom is used to invoke C functions bound to the main module and defined + # pythontarget.c. + return self.lf_module().update_deadline(self, updated_deadline)