Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions LinguaFrancaBase/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,18 @@ def check_deadline(self, invoke_deadline_handler=True):
# 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:
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
# pythontarget.c.
return self.lf_module().update_deadline(self, updated_deadline)

def register_user_trace_event(self, description: str):
"""Register a user trace event for tracing. Enable tracing in the target (e.g. tracing: True).

Expand Down