[Cryptech-Commits] [sw/pkcs11] 02/04: Cleanup.

git at cryptech.is git at cryptech.is
Sat Mar 3 22:49:42 UTC 2018


This is an automated email from the git hooks/post-receive script.

sra at hactrn.net pushed a commit to branch master
in repository sw/pkcs11.

commit 1757b40bfe2b2d2f60dc66143fc0e9e11db2cb0e
Author: Rob Austein <sra at hactrn.net>
AuthorDate: Sat Mar 3 17:10:41 2018 -0500

    Cleanup.
---
 scripts/thready-time-signature.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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)
 
 



More information about the Commits mailing list