发布时间:2019-07-30 09:44:56编辑:auto阅读(1725)
#/usr/bin/env python3
import time
def outer(key):
def timer(func):
def wrapper(*args,**kwargs):
print(key)
s=time.time()
res=func(*args,**kwargs)
e=time.time()
print(e-s)
return res
return wrapper
return timer
@outer('dec info')
def do(a):
time.sleep(1)
print(a)
return a+1
上一篇: 安装H3C的各种问题
下一篇: Python Day16 Django
50499
49803
40401
37421
31840
28704
27632
22416
22415
20730
492°
1106°
905°
838°
1084°
960°
1574°
2941°
2623°
2015°