Added code to track and calculate wait time.