Timer
timer
util function used to log the time taken by a part of program
Source code in Docs2KG/utils/timer.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
__enter__()
context enters to start to write this
Source code in Docs2KG/utils/timer.py
26 27 28 29 30 31 32 |
|
__exit__(context, value, traceback)
context exit will write this
Source code in Docs2KG/utils/timer.py
34 35 36 37 38 39 |
|
__init__(the_logger, message)
init the timer
Parameters:
Name | Type | Description | Default |
---|---|---|---|
the_logger |
Logger
|
logger object |
required |
message |
str
|
message to be logged |
required |
Source code in Docs2KG/utils/timer.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
|