Commit a2371171 authored by Andreas Schmidt's avatar Andreas Schmidt
Browse files

Add both to CSV.

parent bf36d136
Loading
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -100,6 +100,7 @@ int main(int argc, char **argv) {
    #endif

    long long int *rtts = calloc((size_t) rounds, sizeof(long long int));
    long long int *rtts2 = calloc((size_t) rounds, sizeof(long long int));

    s = PrrtSocket_create(false, HALF_TIMESTAMP-1);
    check(s != NULL, "Could not create socket.");
@@ -126,18 +127,21 @@ int main(int argc, char **argv) {
            continue;
        }
        int round = 0;
		struct timespec now;
        struct timespec * old;
        struct timespec * channel;
		clock_gettime(CLOCK_REALTIME, &now);
        sscanf(buffer, "%10d", &round);
        old = (struct timespec *) (buffer + 20);
        channel = (struct timespec *) (buffer + n - sizeof(struct timespec));

        rtts[round] = timedelta(channel, old);
        rtts2[round] = timedelta(&now, old);
        i++;
    }

    for (i = 0; i < rounds; i++) {
        fprintf(out_desc, "%u, %lli\n", i, rtts[i]);
        fprintf(out_desc, "%u, %lli, %lli\n", i, rtts[i], rtts2[i]);
    }


@@ -150,6 +154,8 @@ int main(int argc, char **argv) {
    }

    PrrtSocket_close(s);
    free(rtts);
    free(rtts2);
    free(s);
    free(tstable_data);
    free(tstable_redundancy);