bool RHReliableDatagram::recvfromAckTimeout(uint8_t* buf, uint8_t* len, uint16_t timeout, uint8_t* from, uint8_t* to, uint8_t* id, uint8_t* flags) { unsigned long starttime = millis(); while ((millis() - starttime) < timeout) if (recvfromAck(buf, len, from, to, id, flags)) return true; return false; }
boolean RF22ReliableDatagram::recvfromAckTimeout(uint8_t* buf, uint8_t* len, uint16_t timeout, uint8_t* from, uint8_t* to, uint8_t* id, uint8_t* flags) { Timer t; unsigned long endtime = t.read_ms() + timeout; while (t.read_ms() < endtime) if (recvfromAck(buf, len, from, to, id, flags)) return true; return false; }
boolean RF22Router::recvfromAckTimeout(uint8_t* buf, uint8_t* len, uint16_t timeout, uint8_t* source, uint8_t* dest, uint8_t* id, uint8_t* flags) { unsigned long endtime = millis() + timeout; while (millis() < endtime) { if (recvfromAck(buf, len, source, dest, id, flags)) return true; } return false; }
bool RHRouter::recvfromAckTimeout(uint8_t* buf, uint8_t* len, uint16_t timeout, uint8_t* source, uint8_t* dest, uint8_t* id, uint8_t* flags) { unsigned long starttime = millis(); while ((millis() - starttime) < timeout) { if (recvfromAck(buf, len, source, dest, id, flags)) return true; YIELD; } return false; }
boolean RF22Mesh::recvfromAckTimeout(uint8_t* buf, uint8_t* len, uint16_t timeout, uint8_t* from, uint8_t* to, uint8_t* id, uint8_t* flags) { freeMem( F( "RF22Mesh::recvfromAckTimeout" ) ); unsigned long starttime = millis(); while ((millis() - starttime) < timeout) { if (recvfromAck(buf, len, from, to, id, flags)) return true; } return false; }
boolean RF22Router::recvfromAckTimeout(uint8_t* buf, uint8_t* len, uint16_t timeout, uint8_t* source, uint8_t* dest, uint8_t* id, uint8_t* flags) { Timer t; t.start(); unsigned long endtime = t.read_ms() + timeout; while (t.read_ms() < endtime) { if (recvfromAck(buf, len, source, dest, id, flags)) return true; } return false; }
bool recvfromAckTimeout(uint8_t* buf, uint8_t* len, uint16_t timeout, uint8_t* from, uint8_t* to, uint8_t* id, uint8_t* flags) { unsigned long starttime = millis(); int32_t timeLeft; while ((timeLeft = timeout - (millis() - starttime)) > 0) { if (waitAvailableTimeout(timeLeft)) { if (recvfromAck(buf, len, from, to, id, flags)) return true; } YIELD; } return false; }