24 import java.io.PrintWriter;
 
   26 import java.util.TreeMap;
 
   27 import java.text.DecimalFormat;
 
   34     static protected final PrintWriter out = 
new PrintWriter(System.out, 
true);
 
   36     static protected Map< String, Frame > methods
 
   37         = 
new TreeMap< String, Frame >();
 
   39     static protected class Frame {
 
   53     static public void leave(
String name) {
 
   55         final int t0 = t1 - 1;
 
   60         Frame f = methods.get(name);
 
   63             Frame g = methods.put(name, f);
 
   71     static public void report() {
 
   72         out.println(
"*** HrtProfile Begin ***");
 
   73         out.println(
"\t#calls \trtmicros \tctmicros \tname");
 
   74         for (Map.Entry< 
String, Frame > e : methods.entrySet()) {
 
   76             Frame f = e.getValue();
 
   77             DecimalFormat nf = 
new DecimalFormat(
"###,###,###,###");
 
   78             out.print(
"\t" + nf.format(f.calls));
 
   79             out.print(
"\t" + nf.format(f.rtmicros));
 
   80             out.print(
"\t" + nf.format(f.ctmicros));
 
   81             out.println(
"\t" + m);
 
   83         out.println(
"*** HrtProfile End ***");