registering tick events when simulation starts running
This commit is contained in:
parent
fff8b46110
commit
ac4f2544b8
1 changed files with 6 additions and 8 deletions
|
@ -24,7 +24,7 @@
|
|||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: Simulation.java,v 1.28 2008/10/29 15:55:46 fros4943 Exp $
|
||||
* $Id: Simulation.java,v 1.29 2008/11/03 18:09:43 fros4943 Exp $
|
||||
*/
|
||||
|
||||
package se.sics.cooja;
|
||||
|
@ -176,6 +176,11 @@ public class Simulation extends Observable implements Runnable {
|
|||
logger.info("Simulation main loop started, system time: " + lastStartTime);
|
||||
isRunning = true;
|
||||
|
||||
/* Schedule tick events */
|
||||
scheduleEvent(tickMotesEvent, currentSimulationTime);
|
||||
scheduleEvent(tickMspMotesEvent, currentSimulationTime);
|
||||
scheduleEvent(delayEvent, currentSimulationTime);
|
||||
|
||||
/* Simulation starting */
|
||||
this.setChanged();
|
||||
this.notifyObservers(this);
|
||||
|
@ -237,13 +242,6 @@ public class Simulation extends Observable implements Runnable {
|
|||
public Simulation(GUI gui) {
|
||||
myGUI = gui;
|
||||
delayMotesRandom.setSeed(randomSeed);
|
||||
|
||||
/* XXX Remove me */
|
||||
scheduleEvent(tickMotesEvent, currentSimulationTime);
|
||||
/* XXX Remove me */
|
||||
scheduleEvent(tickMspMotesEvent, currentSimulationTime);
|
||||
/* XXX Remove me? */
|
||||
scheduleEvent(delayEvent, currentSimulationTime);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue