import time


def loop(tasks=1, breaks=0, *args, **kwargs):
    """
    Loop a function X amount of times

    :param tasks: Amount of times to loop the function
    :param breaks: The amount of time to wait between each loop.
    """
    def wrapper(original_func, *args, **kwargs):
        for i in range(tasks):
            original_func(*args, **kwargs)
            time.sleep(breaks)
    return wrapper