aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2018-03-03 17:10:41 -0500
committerRob Austein <sra@hactrn.net>2018-03-03 17:10:41 -0500
commit1757b40bfe2b2d2f60dc66143fc0e9e11db2cb0e (patch)
treebb49e4464b34068684b4c0d4e81dac502990bc0f /scripts
parent1cb495bfcc0872b005bebc81c058e91d577f1db1 (diff)
Cleanup.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/thready-time-signature.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/thready-time-signature.py b/scripts/thready-time-signature.py
index 6d95d2b..e0e82b5 100755
--- a/scripts/thready-time-signature.py
+++ b/scripts/thready-time-signature.py
@@ -91,6 +91,7 @@ class Results(object):
self.lock = threading.RLock()
self.sum = datetime.timedelta(seconds = 0)
self.t0 = datetime.datetime.now()
+ self.t1 = None
self.n = 0
def add(self, t0, t1):
@@ -111,7 +112,8 @@ class Results(object):
def report(self):
with self.lock:
- self.t1 = datetime.datetime.now()
+ if self.t1 is None:
+ self.t1 = datetime.datetime.now()
print "n {0.n} t0 {0.t0} t1 {0.t1} mean {0.mean} tmean {0.tmean}".format(self)