Class SimpleTimingSummary
- java.lang.Object
-
- com.pervasivecode.utils.concurrent.timing.SimpleTimingSummary
-
- All Implemented Interfaces:
MultistageStopwatch.TimingSummary
public abstract class SimpleTimingSummary extends Object implements MultistageStopwatch.TimingSummary
A basic TimingSummary implememtation, with validation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSimpleTimingSummary.BuilderThis object will build aSimpleTimingSummaryinstance.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static SimpleTimingSummary.Builderbuilder()abstract longnumStartStopCycles()Get the number of times that all timers belonging to this stopwatch have been started and then stopped.abstract DurationtotalElapsedTime()Get the total amount of time used by all start-stop cycles of all timers belonging to this stopwatch.
-
-
-
Method Detail
-
totalElapsedTime
public abstract Duration totalElapsedTime()
Description copied from interface:MultistageStopwatch.TimingSummaryGet the total amount of time used by all start-stop cycles of all timers belonging to this stopwatch.This value is not likely to be equivalent to wall-clock time, since a MultistageStopwatch instance may be used to produce ActiveTimer instances belonging to separate, concurrently-executing threads.
- Specified by:
totalElapsedTimein interfaceMultistageStopwatch.TimingSummary- Returns:
- The total amount of time used by all timers belonging to this stopwatch.
-
numStartStopCycles
public abstract long numStartStopCycles()
Description copied from interface:MultistageStopwatch.TimingSummaryGet the number of times that all timers belonging to this stopwatch have been started and then stopped.- Specified by:
numStartStopCyclesin interfaceMultistageStopwatch.TimingSummary- Returns:
- The number of start-then-stop cycles.
-
builder
public static SimpleTimingSummary.Builder builder()
-
-