package hu.ppke.itk.java.hakta.hf10;

public class Doc extends Thread {
	
	public final int TIME_PER_PAGE = 2000;
	public int id, pages;
	
	public Doc(int id, int pages) {
		this.id = id;
		this.pages = pages;
	}

	@Override
	public synchronized void run() {
		try {
			this.wait(pages*TIME_PER_PAGE);
		}
        catch (InterruptedException e) { 
            // Restore the interrupted status
            Thread.currentThread().interrupt();
        }
	}

}
