On 11/07/2011 05:52 AM, Hervé Poussineau wrote:
Signed-off-by: Hervé Poussineau<hpous...@reactos.org>
---
net/dump.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/net/dump.c b/net/dump.c
index 8132411..4b48d48 100644
--- a/net/dump.c
+++ b/net/dump.c
@@ -30,6 +30,7 @@
typedef struct DumpState {
VLANClientState nc;
+ int64_t start_ts;
int fd;
int pcap_caplen;
} DumpState;
@@ -70,7 +71,7 @@ static ssize_t dump_receive(VLANClientState *nc, const
uint8_t *buf, size_t size
ts = muldiv64(qemu_get_clock_ns(vm_clock), 1000000, get_ticks_per_sec());
I agree that using host time as timestamp is more reasonable than the
virtual clock because in most cases rtc for guest is based on host time
not virtual clock.
I think we can simply use "host_clock" instead of "vm_clock" to achieve
that. It will use the same time as host no matter what option is
specified for guest's rtc. With your patch, the time stamp will keep the
same as the choice of guest rtc, which is utc default.
- ts = muldiv64(qemu_get_clock_ns(vm_clock), 1000000,
get_ticks_per_sec());
+ ts = muldiv64(qemu_get_clock_ns(host_clock), 1000000,
get_ticks_per_sec());
caplen = size > s->pcap_caplen ? s->pcap_caplen : size;