private void cpu() {
        switch (this.getGeneratoreRouting().getNextRoute()) {
            case IO:
                if (this.getIo().isFree()) {
                    this.getIo().setFree(false);
                    this.getIo().setJob(this.getCpu().getJob());
                    this.getCpu().setJob(null);
                    this.getCpu().setFree(true);
                    this.getIo().getJob().setTempoProcessamento(this.getIo().getGeneratore().getNextExp());
                    this.getCalendar().setTempoIO(this.getClock() + this.getIo().getJob().getTempoProcessamento());
                } else {
                    this.getIo().getIoQ().add(this.getCpu().getJob());
                    this.getCpu().setJob(null);
                    this.getCpu().setFree(true);
                }
                break;
            case OUT:
                this.getCpu().setFree(true);
                this.getCpu().getJob().setTempoUscita(this.getClock());
                this.getTempiUscita().add(this.getCpu().getJob().getTempoJob());
                this.getCpu().setJob(null);
                break;
        }
        if (this.getCpu().getCpuQ().size() > 0) {
            this.getCpu().setJob(this.getCpu().getJobFromQ());
            this.getCpu().setFree(false);
            this.getCpu().getJob().setTempoProcessamento(this.getCpu().getGeneratore().getNextExp());
            this.getCalendar().setTempoCPU(this.getClock() + this.getCpu().getJob().getTempoProcessamento());
        } else {
            this.getCalendar().setTempoCPU(Double.MAX_VALUE);
            this.getCpu().setFree(true);
            this.getCpu().setJob(null);
        }
    }