Commit e537de49 authored by Peter Eastman's avatar Peter Eastman
Browse files

Fixed a bug in runForClockTime()

parent 508dab43
...@@ -135,7 +135,7 @@ class Simulation(object): ...@@ -135,7 +135,7 @@ class Simulation(object):
if endStep is None: if endStep is None:
endStep = sys.maxint endStep = sys.maxint
nextReport = [None]*len(self.reporters) nextReport = [None]*len(self.reporters)
while self.currentStep < endStep: while self.currentStep < endStep and (endTime is None or datetime.now() < endTime):
nextSteps = endStep-self.currentStep nextSteps = endStep-self.currentStep
anyReport = False anyReport = False
for i, reporter in enumerate(self.reporters): for i, reporter in enumerate(self.reporters):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment