code: public static long tick(String str, PrintStream stream) {
      long elapsed = tick();
      stream.println(str + " Time elapsed: " + (elapsed) + " ms");
      return elapsed;
    }
docs: Print elapsed time and restart (static) timer.
  
  @param str    Additional prefix string to be printed
  @param stream PrintStream on which to write output
  @return Number of milliseconds elapsed