From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54928) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPutH-0005Sa-Pc for qemu-devel@nongnu.org; Fri, 05 Sep 2014 10:53:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPut6-00031L-Ps for qemu-devel@nongnu.org; Fri, 05 Sep 2014 10:53:31 -0400 Received: from dew.nodalink.com ([95.130.14.197]:42536) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPut6-00030B-IC for qemu-devel@nongnu.org; Fri, 05 Sep 2014 10:53:20 -0400 Date: Fri, 5 Sep 2014 14:53:18 +0000 From: =?iso-8859-1?Q?Beno=EEt?= Canet Message-ID: <20140905145318.GA18866@nodalink.com> References: <1409926898-1737-1-git-send-email-benoit.canet@nodalink.com> <1409926898-1737-2-git-send-email-benoit.canet@nodalink.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/2] timers: Move NANOSECONDS_PER_SECONDS to timer.h for future reuse List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Kevin Wolf , Stefan Hajnoczi , QEMU Developers , =?iso-8859-1?Q?Beno=EEt?= Canet , Markus Armbruster On Fri, Sep 05, 2014 at 03:31:16PM +0100, Peter Maydell wrote: > On 5 September 2014 15:21, Beno=EEt Canet w= rote: > > Signed-off-by: Beno=EEt Canet > > --- > > include/qemu/throttle.h | 2 -- > > include/qemu/timer.h | 2 ++ > > 2 files changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/include/qemu/throttle.h b/include/qemu/throttle.h > > index b890613..1c639d2 100644 > > --- a/include/qemu/throttle.h > > +++ b/include/qemu/throttle.h > > @@ -27,8 +27,6 @@ > > #include "qemu-common.h" > > #include "qemu/timer.h" > > > > -#define NANOSECONDS_PER_SECOND 1000000000.0 > > - > > typedef enum { > > THROTTLE_BPS_TOTAL, > > THROTTLE_BPS_READ, > > diff --git a/include/qemu/timer.h b/include/qemu/timer.h > > index 5f5210d..70ce891 100644 > > --- a/include/qemu/timer.h > > +++ b/include/qemu/timer.h > > @@ -5,6 +5,8 @@ > > #include "qemu-common.h" > > #include "qemu/notify.h" > > > > +#define NANOSECONDS_PER_SECOND 1000000000.0 >=20 > I was slightly surprised to see this was a floating > point constant rather than an integer. I wonder if > we'll get bitten by that in future... The origin is the throttle code which does a lot of computation on double= . I'll check if throttle works fine with this constants as an integer. Best regards Beno=EEt >=20 > -- PMM