Discuss / Python / OVO

IrisBlume

#1 Created at ... [Delete] [Delete and Lock User]
def metric(fn):    @functools.wraps(fn)    def wraps(*args, **kw):        print('%s executed in %s ms' % (fn.__name__, datetime.datetime.now().strftime('%H:%M:%S.%f')))        return fn(*args, **kw)    return wraps

  • 1

Reply