Someone
public text v1 · immutablestatic void read_procs(BufferedReader in) {
System.out.println("enter the processes, one line each, followed by an empty line or EOF to end");
System.out.println("format: length start_time");
try {
int id = 0;
String line;
while((line = in.readLine()) != null && line.length() > 0) {
Process proc = new Process(id);
if(proc.read_desc(line)) {
runq.add(proc);
id++;
}
}
}
catch(IOException e) {} // that's ok, just got an EOF, so stop reading.
}