import time


def time_it(func):
    """Prints how long it took to run a function, after it runs"""
    def new_func(*args, **kwargs):
        before = time.time()
        func(*args, **kwargs)
        after = time.time()

        duration = after - before
        print(f'-- took {duration:.2f} seconds')
        print()

    return new_func