All pastes #432756 Raw Edit

Mine

public text v1 · immutable
·published 2007-04-10 12:43 UTC
rendered paste body
static 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.
	}