Introduction
Here is the source code for Main.java
Source
public class Main {
public static void main(String[] args) {
long start = System.nanoTime();
// block of code to time
long end = System.nanoTime();
System.out.println("It took " + (end - start) + " nanoseconds");
}
}