Skip to content
Snippets Groups Projects
Commit 685b29e5 authored by Markus Alexander Kuppe's avatar Markus Alexander Kuppe
Browse files

Remove redundant starttime variable with starttimestamp.

[Refactor][Toolbox]
parent bd246333
Branches
Tags
No related merge requests found
...@@ -146,24 +146,8 @@ public class TLCModelLaunchDataProvider implements ITLCOutputListener ...@@ -146,24 +146,8 @@ public class TLCModelLaunchDataProvider implements ITLCOutputListener
// should be put in the user output widget // should be put in the user output widget
protected boolean isTLCStarted = false; protected boolean isTLCStarted = false;
/**
* Set to the starting time of the current TLC run.
* Actually, it is set to the time when the TLC Start
* message is processed. Thus, there is no guarantee
* that this time bears any relation to startTimeStamp.
*/
protected long startTime = 0;
protected int numWorkers = 0; protected int numWorkers = 0;
/**
* @return the startTime
*/
public long getStartTime()
{
return startTime;
}
public TLCModelLaunchDataProvider(Model model) public TLCModelLaunchDataProvider(Model model)
{ {
this.model = model; this.model = model;
...@@ -190,7 +174,6 @@ public class TLCModelLaunchDataProvider implements ITLCOutputListener ...@@ -190,7 +174,6 @@ public class TLCModelLaunchDataProvider implements ITLCOutputListener
coverageInfo = new Vector<CoverageInformationItem>(); coverageInfo = new Vector<CoverageInformationItem>();
progressInformation = new Vector<StateSpaceInformationItem>(); progressInformation = new Vector<StateSpaceInformationItem>();
startTime = 0;
startTimestamp = Long.MIN_VALUE; startTimestamp = Long.MIN_VALUE;
finishTimestamp = Long.MIN_VALUE; finishTimestamp = Long.MIN_VALUE;
tlcMode = ""; tlcMode = "";
...@@ -431,7 +414,6 @@ public class TLCModelLaunchDataProvider implements ITLCOutputListener ...@@ -431,7 +414,6 @@ public class TLCModelLaunchDataProvider implements ITLCOutputListener
case EC.TLC_STARTING: case EC.TLC_STARTING:
isTLCStarted = true; isTLCStarted = true;
this.startTimestamp = GeneralOutputParsingHelper.parseTLCTimestamp(outputMessage); this.startTimestamp = GeneralOutputParsingHelper.parseTLCTimestamp(outputMessage);
this.startTime = System.currentTimeMillis();
informPresenter(ITLCModelLaunchDataPresenter.START_TIME); informPresenter(ITLCModelLaunchDataPresenter.START_TIME);
break; break;
......
...@@ -109,7 +109,6 @@ public class ResultPage extends BasicFormPage implements ITLCModelLaunchDataPres ...@@ -109,7 +109,6 @@ public class ResultPage extends BasicFormPage implements ITLCModelLaunchDataPres
private Text startTimestampText; private Text startTimestampText;
// startTime is provided by the TLCModelLaunchDataProvider's getStartTime() // startTime is provided by the TLCModelLaunchDataProvider's getStartTime()
// method. // method.
private long startTime = 0;
private Text finishTimestampText; private Text finishTimestampText;
private Text tlcModeText; private Text tlcModeText;
private Text lastCheckpointTimeText; private Text lastCheckpointTimeText;
...@@ -192,7 +191,6 @@ public class ResultPage extends BasicFormPage implements ITLCModelLaunchDataPres ...@@ -192,7 +191,6 @@ public class ResultPage extends BasicFormPage implements ITLCModelLaunchDataPres
break; break;
} }
ResultPage.this.startTimestampText.setText(new Date(ResultPage.this.startTimestamp).toString()); ResultPage.this.startTimestampText.setText(new Date(ResultPage.this.startTimestamp).toString());
ResultPage.this.startTime = dataProvider.getStartTime();
break; break;
case END_TIME: case END_TIME:
long finishTimestamp = dataProvider.getFinishTimestamp(); long finishTimestamp = dataProvider.getFinishTimestamp();
...@@ -381,7 +379,6 @@ public class ResultPage extends BasicFormPage implements ITLCModelLaunchDataPres ...@@ -381,7 +379,6 @@ public class ResultPage extends BasicFormPage implements ITLCModelLaunchDataPres
} }
this.startTimestampText.setText(""); this.startTimestampText.setText("");
this.startTimestamp = 0; this.startTimestamp = 0;
this.startTime = 0;
this.finishTimestampText.setText(""); this.finishTimestampText.setText("");
this.tlcModeText.setText(""); this.tlcModeText.setText("");
this.lastCheckpointTimeText.setText(""); this.lastCheckpointTimeText.setText("");
...@@ -1223,7 +1220,7 @@ public class ResultPage extends BasicFormPage implements ITLCModelLaunchDataPres ...@@ -1223,7 +1220,7 @@ public class ResultPage extends BasicFormPage implements ITLCModelLaunchDataPres
data[0] = 0; data[0] = 0;
times[0] = 0; times[0] = 0;
long startTime = resultPage.startTime; long startTime = resultPage.startTimestamp;
TLCUIActivator.getDefault().logDebug("first reported time - starttime = " TLCUIActivator.getDefault().logDebug("first reported time - starttime = "
+ (ssInfo[0].getTime().getTime() - startTime)); + (ssInfo[0].getTime().getTime() - startTime));
if (startTime > ssInfo[0].getTime().getTime() - 1000) if (startTime > ssInfo[0].getTime().getTime() - 1000)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment