DurationInfo, StatisticDurationTracker@Public
@Unstable
public class OperationDuration
extends java.lang.Object
| Constructor | Description |
|---|---|
OperationDuration() |
Instantiate.
|
| Modifier and Type | Method | Description |
|---|---|---|
java.time.Duration |
asDuration() |
Get the duration of an operation as a java Duration
instance.
|
void |
finished() |
Update the finished time with the current system time.
|
java.lang.String |
getDurationString() |
Return the duration as
humanTime(long). |
static java.lang.String |
humanTime(long time) |
Convert to a human time of minutes:seconds.millis.
|
protected long |
time() |
Evaluate the system time.
|
java.lang.String |
toString() |
Return the duration as
humanTime(long). |
long |
value() |
Get the duration in milliseconds.
|
public OperationDuration()
protected long time()
public void finished()
public java.lang.String getDurationString()
humanTime(long).public static java.lang.String humanTime(long time)
time - time to humanize.public java.lang.String toString()
humanTime(long).toString in class java.lang.Objectpublic long value()
This will be 0 until a call
to finished() has been made.
public java.time.Duration asDuration()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.