发布时间:2019-07-30 09:44:56编辑:auto阅读(2083)
#/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
54088
40845
35357
31013
25904
25641
24079
19607
15684
15163
1899°
1747°
1837°
1916°
1909°
2080°
2041°
1864°
1951°
1935°