/** * Wait for your number to come up so you could send a request * * @return bool OK to send request, otherwise wait */ public function okToSendRequest(Position $pos) { if (MemoryData::getNumRequestsThisSecond() <= 9 && MemoryData::getNumRequestsToday() < 100000 && ($pos->getPrevPositionId() == MemoryData::getCurrentPosition() || MemoryData::getSecondsSinceLastRequest() > 30)) { MemoryData::registerSendingRequest($pos); return true; } else { return false; } }