[Qemu-devel] Re: [PATCH 08/10] Count nanoseconds with uint64_t not doubles

2010-12-01 Thread Juan Quintela
Anthony Liguori wrote: > On 11/23/2010 05:03 PM, Juan Quintela wrote: >> From: Juan Quintela >> >> Signed-off-by: Juan Quintela >> Signed-off-by: Juan Quintela >> > > Why? I needed the precision for the timestamp. Nanoseconds is an "integer" property, not a float value. And ferther more, un

[Qemu-devel] Re: [PATCH 08/10] Count nanoseconds with uint64_t not doubles

2010-12-01 Thread Paolo Bonzini
On 11/24/2010 12:03 AM, Juan Quintela wrote: -bwidth = qemu_get_clock_ns(rt_clock) - bwidth; -bwidth = (bytes_transferred - bytes_transferred_last) / bwidth; +t0 = qemu_get_clock_ns(rt_clock) - t0; +bwidth = (bytes_transferred - bytes_transferred_last) / t0; The result here is i