// Originate timestamp
t1 = micros();
// Wait till data is there or timeout...
int cb = 0;
do {
// Destination timestamp, well, sort of :)
t4 = micros();
if ((t4 - t1) > 1000 * 1000UL) {
// timeout after 1000 ms
return false;
}
cb = udp.parsePacket();
} while (cb == 0);
// We've received a packet, read the data from it
udp.read(packetBuffer, NTP_PACKET_SIZE); // read the packet into the buffer
I use micro() function to timeout a do-while loop
which gets compiled to
so it seems that the timeout check is not compiled in.
The same fragment of code without ArduinoShrink library compiles to
I compiled it with the most recent version (1.8.16) of Arduino IDE and standard settings.