Discuss / Python / 求时间戳的差

求时间戳的差

Topic source

def metric(func): @functools.wraps(func) def wrapper(args, **kw): t1 = time.time() t = func(args, **kw) t2 = time.time() print('the outcome is %d' %t) print('the excution time is %.4f' % (t2-t1)) return return wrapper


  • 1

Reply