function plotAvgTime;
global time TimeCount
global queueamount sysamount tmpworktime tmpqueuetime

tmpaverageinqueue = zeros(1,TimeCount);
tmpaverageinsystem = zeros(1,TimeCount);

for i=2:TimeCount
    tmpaverageinqueue(i) = tmpqueuetime(i)/time(i);
    tmpaverageinsystem(i) = (tmpworktime(i)+tmpqueuetime(i))/time(i);
end;

figure;
    
    subplot(2,1,1); plot(time(1:TimeCount),tmpaverageinqueue(1:TimeCount),'k');
    grid on;
    subplot(2,1,2); plot(time(1:TimeCount),tmpaverageinsystem(1:TimeCount),'r');
    grid on;
    
