1 package test; 2 3 import alt.jiapi.util.HotSpotAdvice; 4 5 public class DefaultAdvice extends HotSpotAdvice { 6 public void advice() { 7 int l1 = (int)System.currentTimeMillis(); 13 14 doHotSpot(); 15 16 int l2 = (int)System.currentTimeMillis(); 17 System.out.println("It took " + (l2-l1) + " ms to invoke " + 18 getHotSpotName()); 19 20 21 if (l1 < l2) { 22 System.out.println("l1<l2"); 23 } 24 else { 25 System.out.println("l2<l1"); 26 } 27 } 28 } 29 | Popular Tags |