taizilongxu
4/20/2015 - 8:34 AM

123

def timeit(func, *args, **kw):
    def wrap():
        print time.time()
        func(*args, **kw)
        print time.time()
    return wrap