Package dev.comfast.util.time
Class Stopwatch
java.lang.Object
dev.comfast.util.time.Stopwatch
Class for time measurements.
Start measurement === Constructor call time
Every call time() creates measurement with the same start time
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StopwatchTimeMeasure time of running given functiontime()Can be used multiple times to get intermediate times.
-
Constructor Details
-
Stopwatch
public Stopwatch() -
Stopwatch
public Stopwatch(long startTimestamp, long startTimeNs)
-
-
Method Details
-
measure
Measure time of running given function -
time
Can be used multiple times to get intermediate times.- Returns:
- current stopwatch time
-