| Modifier and Type | Class and Description |
|---|---|
| public static interface |
| Modifier and Type | Field and Description |
|---|---|
| private volatile long | startTm
Start time in nanoseconds. |
| private final TimeMeasure. | tmf
Formatter used for |
| Access | Constructor and Description |
|---|---|
| public | TimeMeasure(TimeMeasure.
formatter to use for toString() call _formatterCreate a new instance using _ts millis as |
| public | TimeMeasure()
Create a new instance, used a formatter converting everything >= 5000 ms to seconds (X.Y -> 6.1). |
| Modifier and Type | Method and Description |
|---|---|
| public long | |
| public long | |
| public String | Returns: formatted stringdate format _dateFormat)Formats the elapsed time using the given dateFormatter. |
| pack-priv String | Returns: formatted stringSame as above, used for proper unit testing. |
| public long | |
| public long | |
| public final TimeMeasure | |
| pack-priv void | |
| public String | Returns: elapsed time in msOverrides java. Returns the elapsed time in milliseconds formatted as string. |
| startTm | back to summary |
|---|---|
| private volatile long startTm Start time in nanoseconds. | |
| tmf | back to summary |
|---|---|
| private final TimeMeasure. Formatter used for | |
| TimeMeasure | back to summary |
|---|---|
| public TimeMeasure(TimeMeasure. Create a new instance using _ts millis as
| |
| TimeMeasure | back to summary |
|---|---|
| public TimeMeasure() Create a new instance, used a formatter converting everything >= 5000 ms to seconds (X.Y -> 6.1). | |
| getElapsed | back to summary |
|---|---|
| public long getElapsed() Returns the elapsed time in milliseconds.
| |
| getElapsedAndReset | back to summary |
|---|---|
| public long getElapsedAndReset() | |
| getElapsedFormatted | back to summary |
|---|---|
| public String getElapsedFormatted(DateFormat _dateFormat) Formats the elapsed time using the given dateFormatter. If null is given, a new Formatter with format HH:mm:ss.SSS will be used. The timezone of the given dateFormatter will always be set to 'UTC' to avoid any timezone related offsets.
| |
| getElapsedFormatted | back to summary |
|---|---|
| pack-priv String getElapsedFormatted(DateFormat _dateFormat, long _elapsedTime) Same as above, used for proper unit testing.
| |
| getElapsedSeconds | back to summary |
|---|---|
| public long getElapsedSeconds() Returns the elapsed time in seconds.
| |
| getStartTime | back to summary |
|---|---|
| public long getStartTime() Returns the start time in milliseconds.
| |
| reset | back to summary |
|---|---|
| public final TimeMeasure reset() Resets the start time.
| |
| setStartTm | back to summary |
|---|---|
| pack-priv void setStartTm(long _tm) Change the start time (for unit testing only!). | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns the elapsed time in milliseconds formatted as string. | |
| format | back to summary |
|---|---|
| public String format(long _durationInMillis) | |