public void pruneAllNodeEvents() {
		EventQueue eq = new EventQueue();
		eq.listeners = this.listeners; // inherit the listeners

		Iterator<Event> eventIter = iterator();
		while(eventIter.hasNext()){
			Event e = eventIter.next();
			if(e.isNodeEvent()) {
				e.free(); // also frees a corresponding packet event, inclusive the packet
			} else {
				eq.add(e);
			}
		}
		super.clear(); // kill this set
		sinalgo.runtime.Runtime.eventQueue = eq; // replace the event queue
		notifyListeners(); 
	}