Increase sleep time depending on the size of the waiting queue