qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Paolo Bonzini
Subject: [Qemu-devel] Re: [PATCH 08/10] Count nanoseconds with uint64_t not doubles
Date: Tue, 30 Nov 2010 08:17:34 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101103 Fedora/1.0-0.33.b2pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.6

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 integer too.  Is this desired?

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]