MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / report_time

Function report_time

tools/python-3.11.9-amd64/Tools/scripts/deepfreeze.py:489–496  ·  view source on GitHub ↗
(label: str)

Source from the content-addressed store, hash-verified

487
488@contextlib.contextmanager
489def report_time(label: str):
490 t0 = time.time()
491 try:
492 yield
493 finally:
494 t1 = time.time()
495 if verbose:
496 print(f"{label}: {t1-t0:.3f} sec")
497
498
499def main() -> None:

Callers 1

mainFunction · 0.85

Calls 2

printFunction · 0.50
timeMethod · 0.45

Tested by

no test coverage detected