- fprintf(fp, "%s %llu %llu\n", stats.url.c_str(),
- (long long unsigned)(stats.bytes_received),
- (long long unsigned)(stats.data_bytes_received));
+ if (stats.connect_time == -1) {
+ fprintf(fp, "%s %llu %llu -\n", stats.url.c_str(),
+ (long long unsigned)(stats.bytes_received),
+ (long long unsigned)(stats.data_bytes_received));
+ } else {
+ fprintf(fp, "%s %llu %llu %d\n", stats.url.c_str(),
+ (long long unsigned)(stats.bytes_received),
+ (long long unsigned)(stats.data_bytes_received),
+ int(now - stats.connect_time));
+ }