public void process(double currentTime) {
try {
if (!this.isProcessing()) {
if (!q.isEmpty()) {
Job job = q.removeFromQueue();
double rt = getExecutionTime();
notifyGraphics("enterCpu", job.getJobId(), currentTime, rt);
job.setEnteringCpuTime(currentTime, this);
job.setSystemExitTime(currentTime + rt);
sim.enqueueJob(job);
setProcessing(true);
processingJob = job;
}
}