def times(values):
    """
    Reads the stdout logs, calculates the various cpu times and creates a dictionary
    of idle time and the total time

    Parameters
    ----------
    values : list
        output of the command from the std out logs

    Returns
    -------
    tuple
        idle and total time of the cpu
    """
    user, nice, system, idle, io, irq, soft, steal, _, _ = values

    idle = idle + io
    non_idle = user + nice + system + irq + soft + steal
    total = idle + non_idle

    return total, idle