lwzm
6/25/2014 - 9:30 AM

timeit.py

def timeit(func):
    from time import time
    def wrapper(*args, **kwargs):
        t = time()
        func(*args, **kwargs)
        print(func.__name__, time() - t)
    return wrapper