def func():
time.sleep(5)
print("时间后!测试时间")
def timmer(f): #
def inner():
b = time.time()
f()
s = time.time()
print(s-b)
return inner()
func = timmer(func)
func()
标签:闭包,timmer,inner,func,time,print,def
来源: https://www.cnblogs.com/yexingyi/p/11329794.html