#define REQUEST_RATE 5000 // milliseconds
static byte mymac[] = { 0x74,0x69,0x69,0x2D,0x30,0x31 };
static byte myip[] = { 192,168,1,203 };
static byte gwip[] = { 192,168,1,1 };
const char website[] PROGMEM = "google.com";
static long timer;
static void my_result_cb (byte status, word off, word len) {
Serial.print("<<< reply ");
Serial.print(millis() - timer);
Serial.println(" ms");
}
void setup () {
Serial.begin(57600);
Serial.println("\n[getViaDNS]");
Serial.println( "Failed to access Ethernet controller");
Serial.println("DNS failed");
timer = - REQUEST_RATE;
}
void loop () {
if (millis() > timer + REQUEST_RATE) {
timer = millis();
Serial.println("\n>>> REQ");
}
}