private void processResource()
	{
		// Figure out how long to "process" the resource:
		if (input == null)
			Globals.randomSleep(Globals.MIN_PROCESSING_TIME, Globals.MAX_PROCESSING_TIME);
		else {
			// Read the processing time from the input file.
			// The line should be on the format PROCESS 50-200 (signifying a processing time between 50 and 200 ms).
			String line = input.readLine();
			if (line == null || !line.startsWith("PROCESS ")) {
				System.out.println("ERROR: Input file is incorrectly formatted. Program aborted.");
				System.exit(1);
			}
			StringTokenizer st = new StringTokenizer(line.substring(8), "-");
			long min = Long.parseLong(st.nextToken());
			if (!st.hasMoreTokens()) {
				System.out.println("ERROR: Input file is incorrectly formatted. Program aborted.");
				System.exit(1);
			}
			long max = Long.parseLong(st.nextToken());
			Globals.randomSleep(min, max);
		}
	}