Commit db791847 authored by Joanne Hugé's avatar Joanne Hugé

Improve timestamp prints

parent c1fa2847
......@@ -218,10 +218,9 @@ int main(int argc, char *argv[]) {
int64_t user_space_time = stats->packet_info.userspace_exit_ts - stats->packet_info.userspace_enter_ts;
int64_t kernel_space_time = stats->packet_info.kernelspace_ts - stats->packet_info.userspace_exit_ts;
printf("(%d) User space time: %" PRIi64 "\n",
stats->nb_cycles, user_space_time);
printf("(%d) Kernel space time: %" PRIi64 "\n",
stats->nb_cycles, kernel_space_time);
printf("(%d) User and kernel space time: %*" PRIi64 ", %" PRIi64 "\n",
stats->nb_cycles, 10, user_space_time, kernel_space_time);
}
}
......
......@@ -238,10 +238,8 @@ int main(int argc, char *argv[]) {
int64_t user_space_time = stats->packet_info.userspace_exit_ts - stats->packet_info.userspace_enter_ts;
int64_t kernel_space_time = stats->packet_info.kernelspace_ts - stats->packet_info.userspace_exit_ts;
printf("(%d) User space time: %" PRIi64 "\n",
stats->nb_cycles, user_space_time);
printf("(%d) Kernel space time: %" PRIi64 "\n",
stats->nb_cycles, kernel_space_time);
printf("(%d) User and kernel space time: %*" PRIi64 ", %" PRIi64 "\n",
stats->packets_received, 10, user_space_time, kernel_space_time);
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment