Skip to content

Commit

Permalink
adjusted TimeElapsed for interruptions
Browse files Browse the repository at this point in the history
previously, TimeElapsed would simply calculate time from its
instantiation. Now it can read out the info dict which can hold a more
meaningful runtime value.
  • Loading branch information
msoelch committed Sep 1, 2015
1 parent 16bea41 commit 9b125e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion climin/stops/stops.py
Expand Up @@ -147,7 +147,7 @@ def __init__(self, sec):
self.start = time.time()

def __call__(self, info):
return time.time() - self.start > self.sec
return getattr(info, 'time', time.time()) - self.start > self.sec


def All(criterions):
Expand Down

0 comments on commit 9b125e2

Please sign in to comment.