一:初识
import timedef fun1(): print("哈哈哈") time.sleep(2)def timer(f): def inner(): start_time=time.time() f() end_time=time.time() print(end_time-start_time) return innerf=timer(fun1)f()