import time


def time_it(func):
    """
    Run a function and return the time it took to execute in seconds.
    """
    def timed_func(*args, **kwargs):
        start_time = time.time()
        func(*args, **kwargs)
        end_time = time.time()
        return end_time - start_time
    timed_func.__name__ = func.__name__
    return timed_func