Copyright © 2003-2004 The MITRE Corporation
1617181920212223242526
eventQueue = new TreeSet<SimEvent>(new CmpEvent()); } public void run() { while (!eventQueue.isEmpty()) { SimEvent e = eventQueue.pollFirst(); assert e.getTime() >= currentTime; currentTime = e.getTime(); e.run(); } }
124125126127128129130131
public NetNode(String name) { super(name); InputNodes = new NodeList(); OutputNodes = new NodeList(); inputSection = serviceSection = outputSection = null; receiveBuffer = new SimEvent(); stopped = false; }
420421422423424425426427
// info("about to wait"); this.waitForTime(localInterval * 0.9999999999); simulation.pauseSimulation(); // info("calling listener"); if (localListener != null) localListener.simEventOccurred( new SimEvent(this, getTimeNow())); } }