summaryrefslogtreecommitdiff
path: root/test-cli/test/helpers/iseelogger.py
diff options
context:
space:
mode:
authorManel Caro <mcaro@iseebcn.com>2020-07-31 02:07:37 +0200
committerManel Caro <mcaro@iseebcn.com>2020-07-31 02:07:37 +0200
commitd46bce422fd03cd57d1ba336361da17d6efb48db (patch)
treee5ec7aa1ee5d53a655ce121a7c2ddd95888fc989 /test-cli/test/helpers/iseelogger.py
parent907b96801230e04d02575a3732a73e452089637b (diff)
downloadboard-d46bce422fd03cd57d1ba336361da17d6efb48db.zip
board-d46bce422fd03cd57d1ba336361da17d6efb48db.tar.gz
board-d46bce422fd03cd57d1ba336361da17d6efb48db.tar.bz2
TEST restructure
Diffstat (limited to 'test-cli/test/helpers/iseelogger.py')
-rw-r--r--test-cli/test/helpers/iseelogger.py25
1 files changed, 24 insertions, 1 deletions
diff --git a/test-cli/test/helpers/iseelogger.py b/test-cli/test/helpers/iseelogger.py
index 785a78c..4b1087c 100644
--- a/test-cli/test/helpers/iseelogger.py
+++ b/test-cli/test/helpers/iseelogger.py
@@ -1,6 +1,6 @@
import logging
import logging.handlers
-
+import datetime
class ISEE_Logger(object):
__logger = None
@@ -37,3 +37,26 @@ class ISEE_Logger(object):
def getlogger(self):
return self.__logger
+class MeasureTime:
+ __difference = None
+ __first_time = None
+ __later_time = None
+
+ def __init__(self):
+ self.__first_time = datetime.datetime.now()
+
+ def start(self):
+ self.first_time = datetime.datetime.now()
+
+ def stop(self):
+ self.__later_time = datetime.datetime.now()
+ self.__difference = self.__later_time - self.__first_time
+ return self.__difference.total_seconds()
+
+ def getTime(self):
+ return self.__difference.total_seconds()
+
+
+global logObj
+logObj = ISEE_Logger(logging.INFO)
+