   if (INET::checksum(&reply, sizeof(reply)) != 0) goto error;
 
   // Calculate the time for the ping roundtrip
-  roundtrip -= reply.timestamp;
-  INFO("Roundtrip: %ul us", roundtrip);
+  INFO("Roundtrip: %ul us", stop - reply.timestamp);
 
  error:
   sock->close();

#define IP 192,168,1,150
#define SUBNET 255,255,255,0
static const uint8_t mac[6] __PROGMEM = { MAC };
static const char hostname[] __PROGMEM = "CosaICMPping";

// W5100 Ethernet Controller
W5100 ethernet(mac);

struct icmphdr
{
  uint8_t type;			/* message type */

  Socket* sock = ethernet.socket(Socket::IPRAW, IPPROTO_ICMP);
  ASSERT(sock != NULL);

  INFO("Build ICMP echo request block", 0); trace.flush();
  icmphdr req;
  static uint16_t seq = 0;
  req.type = ICMP_ECHO;
