7.利用装饰器为函数加上统计执行时间的功能。 提示 time模块中的time()函数可以获取当前时间
import time def decorator(f): def wrapper(): a=time.time() print(a) f() b=time.time() print(b) print(b-a) return wrapper() @decorator def now(): print("2018-12-12")