public class P2_PrinterHead{ private char mode = 'M'; private boolean inUse=false; private String jobId; private int timeRemaining = 0; public P2_PrinterHead() { //Nothing to set up. } public synchronized int print(P2_Jobs jobInput, int[] time) { //Set the details of the current job jobId = jobInput.getId(); mode = jobInput.getJobType(); inUse = true; timeRemaining = jobInput.getPages(); int startTime = time[0]; //Wait (and delay the thread) one second per page of the job for(int i = 0; i