Class Stopwatch
public final class Stopwatch
Utility class for stopwatch-related operations.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidtrackInConsole(String name, LongConsumer consumer) Tracks the execution time of a given operation and logs it to the console.
-
Method Details
-
trackInConsole
Tracks the execution time of a given operation and logs it to the console.- Parameters:
name- the name of the operation being trackedconsumer- a LongConsumer that accepts the current time in nanoseconds
-