method for emptying simulation event queue
This commit is contained in:
parent
3a02e43e09
commit
4e1432af97
|
@ -238,6 +238,11 @@ public class Simulation extends Observable implements Runnable {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
public void clearEvents() {
|
||||||
|
eventQueue.removeAll();
|
||||||
|
pollRequests.clear();
|
||||||
|
}
|
||||||
|
|
||||||
public void run() {
|
public void run() {
|
||||||
long lastStartTime = System.currentTimeMillis();
|
long lastStartTime = System.currentTimeMillis();
|
||||||
logger.info("Simulation main loop started, system time: " + lastStartTime);
|
logger.info("Simulation main loop started, system time: " + lastStartTime);
|
||||||
|
@ -974,7 +979,7 @@ public class Simulation extends Observable implements Runnable {
|
||||||
* @param simulationTime
|
* @param simulationTime
|
||||||
* New simulation time (ms)
|
* New simulation time (ms)
|
||||||
*/
|
*/
|
||||||
public void setSimulationTime(int simulationTime) {
|
public void setSimulationTime(long simulationTime) {
|
||||||
currentSimulationTime = simulationTime;
|
currentSimulationTime = simulationTime;
|
||||||
|
|
||||||
this.setChanged();
|
this.setChanged();
|
||||||
|
|
Loading…
Reference in a new issue