# _*_ coding: utf-8 _*_ import functools, time def metric(func): @functools.wraps(func) def wrapper(*args, **kw): a = time.time() f = func(*args, **kw) b = time.time() print('execute %f seconds' % (b-a)) return f return wrapper
Sign in to make a reply
用户6386657610