From c4fdcb6aedfc73e8c5284d7f5e7af2e742f2c4e1 Mon Sep 17 00:00:00 2001 From: Piotr Bartosiewicz Date: Tue, 13 Dec 2016 02:08:17 +0100 Subject: [PATCH] net/pcap: fix timestamps in output pcap file MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes: 4c173302c307 ("pcap: add new driver") Signed-off-by: Michał Mirosław Acked-by: Ferruh Yigit --- drivers/net/pcap/rte_eth_pcap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c index 0912245fef..7f0b650052 100644 --- a/drivers/net/pcap/rte_eth_pcap.c +++ b/drivers/net/pcap/rte_eth_pcap.c @@ -246,7 +246,7 @@ calculate_timestamp(struct timeval *ts) { cycles = rte_get_timer_cycles() - start_cycles; cur_time.tv_sec = cycles / hz; - cur_time.tv_usec = (cycles % hz) * 10e6 / hz; + cur_time.tv_usec = (cycles % hz) * 1e6 / hz; timeradd(&start_time, &cur_time, ts); } -- 2.20.1