diff options
author | Manel Caro <mcaro@iseebcn.com> | 2020-07-31 02:07:37 +0200 |
---|---|---|
committer | Manel Caro <mcaro@iseebcn.com> | 2020-07-31 02:07:37 +0200 |
commit | d46bce422fd03cd57d1ba336361da17d6efb48db (patch) | |
tree | e5ec7aa1ee5d53a655ce121a7c2ddd95888fc989 /test-cli/test/helpers/iseelogger.py | |
parent | 907b96801230e04d02575a3732a73e452089637b (diff) | |
download | board-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.py | 25 |
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) + |