protected void resetQueue()
	{
		queueNode trc;
		queueNode trcPrev = null;

		//Delete expired nodes
		trc = jHead;

		while(trc!=null)
		{
			if(trc.getExpired())
			{
				if(trcPrev == null)
				{
					jHead = trc.getNext();
					if(jHead == null)
						jTail = null;
				}
				else if(trc.getNext()==null)
				{
					trcPrev.setNext(null);
					jTail = trcPrev;
				}
				else
				{
					trcPrev.setNext(trc.getNext());
				}
			}

			trcPrev = trc;
			trc = trc.getNext();
		}

		
		//Timer tick the whole list
		trc = jHead;

		while(trc!=null)
		{
			trc.tick();
			trc = trc.getNext();
		}

		//Transfer the old output queue to the holding queue
		if(pHead != null)
		{
			if(jHead == null)
				jHead = pHead;
			else
				jTail.setNext(pHead);

			jTail = pTail;
		}

		//Delete the old output queue
		pHead = null;
		pTail = null;
	}