diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-02-26 18:17:11 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-02-26 18:20:20 +0100 |
commit | 525256a15a581daec7afd9edd65f10b827ff2f51 (patch) | |
tree | 0c7f0056bd1014b233a9346842fcfd240979a5d9 /tests/osmo-pcap-test/osmo_pcap.h | |
parent | f27fdf89dc52799e7c908493da2c9ccdf7b1d3c4 (diff) |
test: osmo-pcap-test: Fix clock drift while replaying pcap file
In the previous implementation, the processing time was not being taken
into account, which was implicitly added for each new packet to be sent,
which caused a steady incremental drift in the clock clearly visible
when analysing a RTP stream.
As it uses timespecsub, it depends on libosmocore Change-Id
I45fc993b9bb0a343763238bf463c8640f47b00f1.
Change-Id: I11cb9a63e16e829ccd4af1096b9f473c802d822f
Diffstat (limited to 'tests/osmo-pcap-test/osmo_pcap.h')
-rw-r--r-- | tests/osmo-pcap-test/osmo_pcap.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/osmo-pcap-test/osmo_pcap.h b/tests/osmo-pcap-test/osmo_pcap.h index 171360d..d10a7f7 100644 --- a/tests/osmo-pcap-test/osmo_pcap.h +++ b/tests/osmo-pcap-test/osmo_pcap.h @@ -3,6 +3,7 @@ #include <pcap.h> #include <osmocom/core/timer.h> +#include <time.h> struct msgb; @@ -11,7 +12,8 @@ void osmo_pcap_init(void); struct osmo_pcap { pcap_t *h; struct osmo_timer_list timer; - struct timeval last; + struct timespec start_sys; + struct timeval start_pcap; struct msgb *deliver_msg; }; |