Changeset 11d4fa5 for doc/theses/andrew_beach_MMath/code/ThrowFinally.java
- Timestamp:
- Jul 7, 2021, 11:56:29 AM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 47e413b
- Parents:
- acb38ce9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/andrew_beach_MMath/code/ThrowFinally.java
racb38ce9 r11d4fa5 13 13 } 14 14 15 private static long loop(int times, int total_frames) { 16 long startTime = System.nanoTime(); 17 for (int count = 0 ; count < times ; ++count) { 18 try { 19 unwind_finally(total_frames); 20 } catch (EmptyException e) { 21 // ... 22 } 23 } 24 long endTime = System.nanoTime(); 25 return endTime - startTime; 26 } 27 15 28 public static void main(String[] args) { 16 29 int times = 1; … … 23 36 } 24 37 25 long startTime = System.nanoTime(); 26 for (int count = 0 ; count < times ; ++count) { 27 try { 28 unwind_finally(total_frames); 29 } catch (EmptyException e) { 30 // ... 31 } 32 } 33 long endTime = System.nanoTime(); 34 System.out.println("Run-Time (ns) " + (endTime - startTime)); 38 // Warm-Up: 39 loop(1000, total_frames); 40 41 long time = loop(times, total_frames); 42 System.out.println("Run-Time (ns): " + time); 35 43 } 36 44 }
Note: See TracChangeset
for help on using the changeset viewer.