import java.util.Date;

class SleepTest {
	static final int ADDRESS = 0x800000;

	public static void main(String[] args) {
	    int loops = 1000;
	    int stime = 100;
	    Date startDate;
	    Date endDate;
	    if (args.length>=2) { stime = Integer.parseInt(args[1]); }
	    if (args.length>=1) { loops = Integer.parseInt(args[0]); }
	    System.out.println("SleepTest: sleeping "+loops+" loops for "+stime+
			       " milliseconds each");
	    startDate = new Date();
	    System.out.println("Start: "+startDate.toString());
	    int i;
	    for (i=0; i<loops; i++) {
		try {
		    Thread.sleep(stime);	
		} catch (InterruptedException ie) {}

	    }
	    endDate = new Date();
	    System.out.println("Complete: "+endDate.toString());
	}
}
