def timeit(unit='<STR_LIT:s>'):
def wrapper(func):<EOL><INDENT>@wraps(func)<EOL>def inner(*args, **kwargs):<EOL><INDENT>start = time.time()<EOL>_result = func(*args, **kwargs)<EOL>_format(unit, time.time() - start, func.__name__ + '<STR_LIT>')<EOL>return _result<EOL><DEDENT>return inner<EOL><DEDENT>return wrapper<EOL>
测试函数耗时

:param unit: 时间单位，有 's','m','h' 可选（seconds，minutes，hours）