Fix syntax error.
Find wait times and calculate average.