summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorLaurent Vivier <lvivier@redhat.com>2015-08-25 17:24:39 +0200
committerLaurent Vivier <lvivier@redhat.com>2015-09-25 14:56:38 +0200
commitab60b7485cece312ad9c21327ee678f0f9898fb5 (patch)
tree9b48212588eb3d2d288f3c1030376788d4de662a /net
parentfdfea124f9e12232f99d9f235267ca1eeeb23469 (diff)
net: remove muldiv64()
muldiv64() is used to convert nanoseconds to microseconds. x = muldiv64(qemu_clock_get_ns(..), 1000000, get_ticks_per_sec()); As get_ticks_per_sec() is 10^9, it can be replaced by: x = qemu_clock_get_us(..); Signed-off-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'net')
-rw-r--r--net/dump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dump.c b/net/dump.c
index 02c8064be0..08259afcb6 100644
--- a/net/dump.c
+++ b/net/dump.c
@@ -69,7 +69,7 @@ static ssize_t dump_receive(NetClientState *nc, const uint8_t *buf, size_t size)
return size;
}
- ts = muldiv64(qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL), 1000000, get_ticks_per_sec());
+ ts = qemu_clock_get_us(QEMU_CLOCK_VIRTUAL);
caplen = size > s->pcap_caplen ? s->pcap_caplen : size;
hdr.ts.tv_sec = ts / 1000000 + s->start_ts;