MCPcopy Create free account
hub / github.com/JasonLSC/GSCodec_Studio / timeblock

Function timeblock

examples/helper/STG/time_utils.py:18–22  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

16# 上下文管理器方式
17@contextmanager
18def timeblock(name):
19 start = time.perf_counter()
20 yield
21 end = time.perf_counter()
22 print(f'{name} took {(end-start)*1000:.2f} ms')

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected