MCPcopy Index your code
hub / github.com/makelove/OpenCV-Python-Tutorial / Timer

Function Timer

官方samples/common.py:146–152  ·  view source on GitHub ↗
(msg)

Source from the content-addressed store, hash-verified

144
145@contextmanager
146def Timer(msg):
147 print(msg, '...',)
148 start = clock()
149 try:
150 yield
151 finally:
152 print("%.2f ms" % ((clock()-start)*1000))
153
154class StatValue:
155 def __init__(self, smooth_coef = 0.5):

Callers 2

match_and_drawFunction · 0.90
gabor_threads.pyFile · 0.90

Calls 1

clockFunction · 0.85

Tested by

no test coverage detected