Esempio n. 1
0
 public static String getElapsedTimeString(String name) {
   NanoTimerElement timer = users.get(name);
   if (timer == null) return "Invalid chronometer: " + name;
   ;
   timer.refresh();
   return "Delta: "
       + formatter.format((double) timer.getDiff() / BILLION)
       + " s. Elapsed: "
       + formatter.format((double) timer.getElapsedTime() / BILLION)
       + " s.";
 }
Esempio n. 2
0
 public static String getElapsedTimeStringAsMillis(String name) {
   NanoTimerElement timer = users.get(name);
   if (timer == null) return "Invalid chronometer: " + name;
   ;
   timer.refresh();
   return "Delta: "
       + timer.getDiff() / MILLION
       + "ms. Elapsed: "
       + timer.getElapsedTime() / MILLION
       + " ms.";
 }
Esempio n. 3
0
 public static long getTimeDeltaMillis(String name) {
   NanoTimerElement timer = users.get(name);
   if (timer == null) return -1;
   timer.refresh();
   return timer.getDiff() / MILLION;
 }