标签:int return port stop The run func ret imp
import time
def timer(func):
def deco():
start_time=time.time()
func()
stop_time=time.time()
print("the func run time is %s" %(stop_time-start_time))
return deco
@timer #test1=time(test1)
def test1():
time.sleep(3)
print(‘in the test1‘)
@timer
def test2():
time.sleep(3)
print (‘in the test2‘)
test1()
test2()
标签:int return port stop The run func ret imp
原文地址:https://www.cnblogs.com/lyzfp/p/11433880.html