/// <summary>
        /// Simulation of the process execution
        /// </summary>
        /// <param name="p">Process to be executed</param>
        /// <returns>Returns 1, if the process was completed;
        /// Returns -1, if the process was not completed.</returns>
        private int CPU(Processo p)
        {
            int aux = 1; // represents how much of the quantum was completed

            while (aux <= Quantum && p.QtdeCiclos > 0)
            {
                p.DiminuirQtdeCiclos();
                Thread.Sleep(sleep); // Simula o tempo gasto pela CPU
                aux++;
            }

            if (p.QtdeCiclos == 0)
            {
                return(1);
            }
            else
            {
                p.DiminuirPrioridade();
            }

            return(-1);
        }