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."; }
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."; }
public static long getTimeDeltaMillis(String name) { NanoTimerElement timer = users.get(name); if (timer == null) return -1; timer.refresh(); return timer.getDiff() / MILLION; }