public static void main(String[] args) {

    	System.out.println("Initializing...");

    	MultiPhaseProgressMonitorWithETA monitor = 
    		new MultiPhaseProgressMonitorWithETA("Testing 2 phases", 2, 5000, 
    				1.0f, null);
    	
    	System.out.println("Running...");

    	for (int i = 0; i <= 5000; i++) {
    		monitor.incrementUnitsCompletedThisPhase(1);
    		
    		System.out.print("\ri = " + i);
    		
    		try {
				Thread.sleep(1);
			} catch (InterruptedException ignored) {
				;
			}
    	}
    	System.out.println();
    	
    	monitor.markCurrentPhaseAsComplete(2000);

    	for (int i = 0; i <= 2000; i++) {
    		monitor.incrementUnitsCompletedThisPhase(1);
    		
    		System.out.print("\ri = " + i);
    		
    		try {
				Thread.sleep(1);
			} catch (InterruptedException ignored) {
				;
			}
    	}
    	
    	monitor.markCurrentPhaseAsComplete(0);

    	System.out.println();
   
    	System.out.println("Done!");
    }