Skip to content

Commit

Permalink
Fixed a bug with tcp_remote_lat timing when crossing seconds boundary
Browse files Browse the repository at this point in the history
Fixed misplaced bracket

(cherry picked from commit fe1af9d)
  • Loading branch information
lwabeke authored and Erik Rigtorp committed Sep 14, 2018
1 parent b1ce1b7 commit 5e52370
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tcp_remote_lat.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ int main(int argc, char *argv[]) {
gettimeofday(&stop, NULL);

delta =
((stop.tv_sec - start.tv_sec) * 1000000000 + stop.tv_usec - start.tv_usec) * 1000;
(stop.tv_sec - start.tv_sec) * 1000000000 + (stop.tv_usec - start.tv_usec) * 1000;

printf("average latency: %li ns\n", delta / (count * 2));

Expand Down

0 comments on commit 5e52370

Please sign in to comment.