test for queue emptiness and time to send in single if statement