queueSize=1;
time=0;
While[queueSize>0,
time+=1;
x=RandomVariate[PoissonDistribution[5]];
queueSize=queueSize+x;
y =RandomVariate[PoissonDistribution[5]];
If[y>queueSize,queueSize=0,queueSize = queueSize-y];
Print["at time ",time," the queue contains: ",queueSize]
]
Print["time until the queue is empty: ",time]