@ThreadSafe private static final class Stopwatch.SingleDuration extends Stopwatch.BaseDurations
Stopwatch.Durations implementation that only remembers the most recently added duration.| Modifier and Type | Field and Description |
|---|---|
private AtomicReference<Stopwatch.Statistics> |
stats |
| Modifier | Constructor and Description |
|---|---|
private |
SingleDuration() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Duration duration) |
Stopwatch.Statistics |
statistics()
Get the statistics for the durations in nanoseconds.
|
toStringprivate final AtomicReference<Stopwatch.Statistics> stats
public Stopwatch.Statistics statistics()
Stopwatch.Durationspublic void add(Duration duration)
add in class Stopwatch.BaseDurationsCopyright © 2019 JBoss by Red Hat. All rights reserved.