net/pcap: fix timestamps in output pcap file

Fixes: 4c173302c3 ("pcap: add new driver")

Signed-off-by: Michał Mirosław <michal.miroslaw@atendesoftware.pl>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
This commit is contained in:
Piotr Bartosiewicz 2016-12-13 02:08:17 +01:00 committed by Ferruh Yigit
parent fec33d5bb3
commit c4fdcb6aed

View File

@ -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);
}