Skip to main content

set_running_unless_stopped_since

Function set_running_unless_stopped_since 

Source
pub(crate) fn set_running_unless_stopped_since(
    mstore: &Store,
    block_id: &str,
    started_at_ms: u64,
) -> bool
Expand description

Record the agent as wanted running, unless a stop was decided as, or after, started_at_ms: the turn that began then is the one the stop ended or the agent quit in. The check and the write are one step against set_desired, so a stop that lands in between is not undone. Returns whether it wrote.