void System::runNext() { if(idleCPU > 0){ auto next = CpuReadySet->next(); if(next != NULL ){ auto startTime = next->startTime; runCPU(next); } } for(int i =0; i < numIO; ++i){ auto next2 = IOReadySet.at(i)->next(); if(next2 != NULL){ if(idleDevices[next2->nextBurstType]) runIO(next2); else IOReadySet.at(i)->add(next2); } } }
void MainWindow::on_playButton_clicked() { runCPU(); }