diff --git a/.gitignore b/.gitignore index f3f921b..36ea009 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ tcpburst +.vscode diff --git a/src/common/abort.c b/src/common/abort.c index 37d730f..9f44133 100644 --- a/src/common/abort.c +++ b/src/common/abort.c @@ -34,6 +34,7 @@ #include "defines.h" #include "common.h" +#include #include #include @@ -76,6 +77,8 @@ break_now(int signo) kill(tcpdump.pid, SIGKILL); #endif */ + if (gettimeofday(&end, NULL) < 0) + errx(-1, "gettimeofday() failed: %s", strerror(errno)); packet_stats(&begin, &end, bytes_sent, pkts_sent, failed); exit(1); }