MCPcopy Create free account
hub / github.com/runhey/OnmyojiAutoScript / function_timer

Function function_timer

module/base/timer.py:13–19  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

11 """
12 @wraps(function)
13 def function_timer(*args, **kwargs):
14 t0 = time.time()
15
16 result = function(*args, **kwargs)
17 t1 = time.time()
18 print('%s: %s s' % (function.__name__, str(round(t1 - t0, 10))))
19 return result
20
21 return function_timer
22

Callers

nothing calls this directly

Calls 1

printFunction · 0.85

Tested by

no test coverage detected