Java Timer

A Java system timer that measures execution time of a loop in milliseconds.

public class Timer{
	public static void main(String[] args) {
		final long startTime = System.currentTimeMillis();

		for (int i = 0; i < 5; i++) {
			//Do something
		}

		final long endTime = System.currentTimeMillis();
		System.out.println("Total execution time: " + (endTime - startTime)  );
	}
}