- Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMain.java
More file actions
Latest commit
19 lines (14 loc) · 472 Bytes
/
Copy pathMain.java
File metadata and controls
19 lines (14 loc) · 472 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
importjava.util.concurrent.TimeUnit;
/*
* Simple class for running problems and calculating
* how long they take.
*/
publicclassMain {
publicstaticvoidmain(String[] args) {
longstartTime = System.nanoTime();
System.out.println(newProblem15().run());
floatelapsedTimeInSeconds = (System.nanoTime() - startTime) /
(float)1000000000; // TODO Change to 1000000000F ????
System.out.println("Took " + elapsedTimeInSeconds + " seconds");
}
}