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:
parent
fec33d5bb3
commit
c4fdcb6aed
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user