import time


def _delayed_time_has_passed(directory_status, delay_minutes):
    """
    Checks if delay_minutes time has passed since directory_status.time

    See time docs for details on time modules functionality
    https://docs.python.org/3/library/time.html
    :param directory_status: time.struct_time
    :param delay_minutes: Integer
    :return: Boolean
    """
    # Delay Time is not set, run is ready for upload
    if delay_minutes == 0 or directory_status.time is None:
        return True

    # float representing the time run was found (in seconds)
    run_found_time_float = time.mktime(directory_status.time)
    # add delay time to found time
    time_plus_delay_float = run_found_time_float + (delay_minutes * 60)
    # get current time
    current_time_float = time.time()
    # compare current time to time when run is ready
    return current_time_float > time_plus_delay_float