Split out wait_time functionality into determine_wait_time
Explanatory comment