tbplas.Timer
- class tbplas.Timer
Class for measuring the time usage of function calls within programs.
- _start_time
time of last tic call
- Type:
Dict[str, float]
- _track_status
whether the slots are being tracked for measuring time usage
- Type:
Dict[str, bool]
- _time_usage
time usage between tic/toc calls
- Type:
Dict[str, float]
- _total_time_usage
overall time usage
- Type:
Dict[str, float]
- __init__() None
Methods
__init__()Report time usage between tic/toc calls.
Report overall time usage.
reset()Reset start time, track status and time usages.
tic(slot)Begin tracking time usage for given slot.
toc(slot)Stop tracking time usage for given slot.
- __init__() None
- report_time() None
Report time usage between tic/toc calls. :return: None
- report_total_time() None
Report overall time usage. :return: None
- reset() None
Reset start time, track status and time usages. :return: None
- tic(slot: str) None
Begin tracking time usage for given slot. :param slot: name of the slot :return: None
- toc(slot: str) None
Stop tracking time usage for given slot. :param slot: name of the slot :return: None
- __weakref__
list of weak references to the object