Measlat add measurement date
This commit is contained in:
parent
c069e495d0
commit
2ced09ceba
1 changed files with 4 additions and 1 deletions
|
@ -70,9 +70,12 @@ int on_udp(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo) {
|
|||
perror("clock_gettime error");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
time_t now;
|
||||
time(&now);
|
||||
char* ctime_no_newline = strtok(ctime(&now), "\n");
|
||||
|
||||
micro_sec = elapsed_micros (&head->emit_time, &curr);
|
||||
printf("Packet %llu latency %luµs\n", (unsigned long long)head->counter, micro_sec);
|
||||
printf("[%s] Packet %llu latency %luµs\n", ctime_no_newline, (unsigned long long)head->counter, micro_sec);
|
||||
|
||||
if (head->counter >= mc->max_measure) {
|
||||
printf("Measurement done\n");
|
||||
|
|
Loading…
Reference in a new issue