From 91a9b6a96ddf6bb9808899b5644849e327eabdb0 Mon Sep 17 00:00:00 2001 From: Byeonggil Jun Date: Thu, 5 Feb 2026 13:19:58 -0700 Subject: [PATCH 1/2] 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) From 0352be872bd922ccf6c27231058a4e10ccf11041 Mon Sep 17 00:00:00 2001 From: Byeonggil Jun <78055940+byeonggiljun@users.noreply.github.com> Date: Fri, 27 Mar 2026 15:08:41 -0700 Subject: [PATCH 2/2] Apply suggestion from @edwardalee Co-authored-by: Edward A. Lee --- LinguaFrancaBase/classes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LinguaFrancaBase/classes.py b/LinguaFrancaBase/classes.py index 84a55d5..d82bbfa 100644 --- a/LinguaFrancaBase/classes.py +++ b/LinguaFrancaBase/classes.py @@ -32,7 +32,7 @@ def update_deadline(self, updated_deadline=0): Update the deadline of the currently executing reaction. Args: - invoke_deadline_handler (interval_t): The updated deadline. + updated_deadline (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