util/time: fix TimeDifferenceMicros microseconds computation

Ticket: 8073

Currently only used in pcap logging for flushing
pull/14310/head
Philippe Antoine 4 days ago committed by Victor Julien
parent 874a0e8d3d
commit b21c93d789

@ -643,5 +643,5 @@ uint64_t SCTimespecAsEpochMillis(const struct timespec* ts)
uint64_t TimeDifferenceMicros(struct timeval t0, struct timeval t1) uint64_t TimeDifferenceMicros(struct timeval t0, struct timeval t1)
{ {
return (uint64_t)(t1.tv_sec - t0.tv_sec) * 1000000L + (t1.tv_usec - t1.tv_usec); return (uint64_t)(t1.tv_sec - t0.tv_sec) * 1000000L + (t1.tv_usec - t0.tv_usec);
} }

Loading…
Cancel
Save