import time


def timeit(func):
    """
    Decorator that returns the total runtime of a function
    @param func: function to be timed
    @return: (func, time_taken). Time is in seconds
    """

    def wrapper(*args, **kwargs) -> float:
        start = time.time()
        func(*args, **kwargs)
        total_time = time.time() - start
        return total_time

    return wrapper