public class ResultFormatterDeltaTime extends AbstractResultFormatter implements ResultFormatter
ResultFormatter
implementation that doesn't display the timestamps
as absolute values but instead displays the duration since the previous
result in the first column. The duration can be displayed in either [s] or
[ms] unit, see setTimeUnit(at.srfg.miner.clientlib.resultformat.ResultFormatterDeltaTime.Unit)
.
The separator can be configured via AbstractResultFormatter.setSeparator(String)
. Also, it
can be configured via AbstractResultFormatter.setShowProxy(boolean)
if the proxy is shown or
not.
Sample output (proxy not shown):
0.0 0 1.0 1 1.006 2 1.001 3 1.001 4 1.001 5 1.001 6 1.001 7 1.001 8 1.001 9
Modifier and Type | Class and Description |
---|---|
static class |
ResultFormatterDeltaTime.Unit
Unit for deltaT, either SECOND or MILLISECOND.
|
Constructor and Description |
---|
ResultFormatterDeltaTime()
Default constructor.
|
ResultFormatterDeltaTime(ResultFormatterDeltaTime.Unit unit)
Constructs a new instance with the given time unit.
|
ResultFormatterDeltaTime(ResultFormatterDeltaTime.Unit unit,
String separator)
Constructs a new instance with the given time unit and separator
|
ResultFormatterDeltaTime(String separator)
Constructs a new instance with the given separator.
|
Modifier and Type | Method and Description |
---|---|
String |
format(Result result)
Transforms the result to a String representation.
|
void |
setTimeUnit(ResultFormatterDeltaTime.Unit unit)
Set the unit for deltaT.
|
getSeparator, isShowProxy, setSeparator, setShowProxy
public ResultFormatterDeltaTime()
public ResultFormatterDeltaTime(String separator)
separator
- the separator between deltaT and the result valuepublic ResultFormatterDeltaTime(ResultFormatterDeltaTime.Unit unit)
unit
- the time unit of deltaT, see ResultFormatterDeltaTime.Unit
public ResultFormatterDeltaTime(ResultFormatterDeltaTime.Unit unit, String separator)
unit
- the time unit of deltaT, see ResultFormatterDeltaTime.Unit
separator
- the separator between deltaT and the result valuepublic String format(Result result)
ResultFormatter
format
in interface ResultFormatter
result
- the result to be transformedpublic void setTimeUnit(ResultFormatterDeltaTime.Unit unit)
unit
- the time unit of deltaTCopyright (c) Salzburg Research Forschungsgesellschaft mbH. All rights reserved.