Vi riporto una porzione del mio codice:
time_t now1 = time (NULL), now2 = time (NULL), now3 = time (NULL);
asctime (localtime (&now1));
printf(" Message:%s\n",buf);
result = send(sd, buf, strlen(buf), 0);
printf(" %d bytes of data were sended.\n", result);
asctime (localtime (&now2));
now3=now2-now1;
printf(" Time: %d\n",now3);
ovviamente qualcosa nel timestamp la sto sbagliando, perchè mi stampa sempre 0