ADTast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change
on this file since e84ab3d was
ee23a8d,
checked in by Andrew Beach <ajbeach@…>, 3 years ago
|
Added duration information (in nanoseconds) to EHM benchmarks.
|
-
Property mode set to
100644
|
File size:
482 bytes
|
Line | |
---|
1 | // Cross a Try Statement with a Finally Clause |
---|
2 | |
---|
3 | public class CrossFinally { |
---|
4 | public static void main(String[] args) { |
---|
5 | int times = 1; |
---|
6 | boolean shouldThrow = false; |
---|
7 | if (0 < args.length) { |
---|
8 | times = Integer.parseInt(args[0]); |
---|
9 | } |
---|
10 | |
---|
11 | long startTime = System.nanoTime(); |
---|
12 | for (int count = 0 ; count < times ; ++count) { |
---|
13 | try { |
---|
14 | // ... |
---|
15 | } finally { |
---|
16 | // ... |
---|
17 | } |
---|
18 | } |
---|
19 | long endTime = System.nanoTime(); |
---|
20 | System.out.println("Run-Time (ns) " + (endTime - startTime)); |
---|
21 | } |
---|
22 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.