Rename the loop counter to numRequestsOutstanding and just reset it when the timer expires.