diff --git a/pyNN/common/control.py b/pyNN/common/control.py index 4e40ae5d..5541a510 100644 --- a/pyNN/common/control.py +++ b/pyNN/common/control.py @@ -79,7 +79,7 @@ def run_until(time_point, callbacks=None): if callbacks: callback_events = [(callback(simulator.state.t), callback) for callback in callbacks] - while simulator.state.t + 1e-9 < time_point: + while simulator.state.t + 1e-9 < time_point - simulator.state.dt: callback_events.sort(key=lambda cbe: cbe[0], reverse=True) next, callback = callback_events.pop() # collapse multiple events that happen within the same timestep