Changed restrictedMemory() to calculate wait and turnaround time.