def update_process(process, stock, time=1):
    """
    Check if process ended
    if so, adding it's output to the stock and setting busy to false.
    """
    process.update(time)
    if (process.done()):
        stock.new(process)
        process.end()
    return process, stock