Class Stopwatch


public final class Stopwatch
Utility class for stopwatch-related operations.
  • Method Details

    • trackInConsole

      public static void trackInConsole(String name, LongConsumer consumer)
      Tracks the execution time of a given operation and logs it to the console.
      Parameters:
      name - the name of the operation being tracked
      consumer - a LongConsumer that accepts the current time in nanoseconds