timer: Move NANOSECONDS_PER_SECONDS to timer.h
authorAlberto Garcia <berto@igalia.com>
Fri, 12 Jun 2015 13:01:29 +0000 (16:01 +0300)
committerStefan Hajnoczi <stefanha@redhat.com>
Thu, 2 Jul 2015 08:20:18 +0000 (09:20 +0100)
We want to be able to reuse this define by making it common to
multiple QEMU modules.

This also makes it an integer since there's no need for it to be a
float.

Signed-off-by: Alberto Garcia <berto@igalia.com>
Message-id: 6375912849da2ab561046dd013684535ccecca44.1434113783.git.berto@igalia.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
include/qemu/throttle.h
include/qemu/timer.h

index 5af76f0ff4f545230f798bbcfc5f6d0b51479121..995b2d595751cc6cfa055b8652b6b396504437a3 100644 (file)
@@ -29,8 +29,6 @@
 #include "qemu-common.h"
 #include "qemu/timer.h"
 
-#define NANOSECONDS_PER_SECOND  1000000000.0
-
 typedef enum {
     THROTTLE_BPS_TOTAL,
     THROTTLE_BPS_READ,
index 9e4f90f4aaeb55390debf8bf829a0cd3bb6d8824..5923d600fd35e0fa923fa9f418b6a0fd95114c7f 100644 (file)
@@ -5,6 +5,8 @@
 #include "qemu-common.h"
 #include "qemu/notify.h"
 
+#define NANOSECONDS_PER_SECOND 1000000000LL
+
 /* timers */
 
 #define SCALE_MS 1000000