+#if HAVE_SYS_TIME_H
+ if (hc->http_server->record_file)
+ {
+ struct timeval tv;
+ int sz = 0;
+ struct http_buf *hb;
+ for (hb = hc->iqueue; hb; hb = hb->next)
+ sz += hb->len;
+ gettimeofday(&tv, 0);
+ fprintf(hc->http_server->record_file, "%lld %lld %lld %d\n",
+ (long long) tv.tv_sec, (long long) tv.tv_usec,
+ (long long) iochan_getfd(i), sz);
+ for (hb = hc->iqueue; hb; hb = hb->next)
+ fwrite(hb->buf, 1, hb->len, hc->http_server->record_file);
+ }
+ #endif