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