Utils
timer
util function used to log the time taken by a part of program
Source code in TimelineKGQA/utils.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
|
__enter__()
context enters to start to write this
Source code in TimelineKGQA/utils.py
112 113 114 115 116 117 118 |
|
__exit__(context, value, traceback)
context exit will write this
Source code in TimelineKGQA/utils.py
120 121 122 123 124 125 |
|
__init__(the_logger, message)
init the timer
Parameters
the_logger: Logger logger to write the logs message: str message to log, like start xxx
Source code in TimelineKGQA/utils.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
|