Пример #1
0
  public void start(final String msg) {
    // Print an optional message, something like "Starting timer t";
    if (msg != null) TRACE.err(msg + "\n");

    // Return immediately if the timer is already running
    if (running) return;

    // Change timer status to running
    running = true;

    // Set the start time;
    startTime = System.currentTimeMillis();
  }
Пример #2
0
 public void check(final String msg) {
   // Print an optional message, something like "Checking timer t";
   if (msg != null) TRACE.err(msg + " : ");
   TRACE.err("[" + (running ? elapsedTime() / TypeDef.CLOCKS_PER_SEC : 0) + "] seconds\n");
 }