[Spice-devel] [PATCH 12/12] move get_time_stamp to main_channel.c

Christophe Fergeau cfergeau at redhat.com
Fri Apr 22 09:43:10 PDT 2011


There is only one user of get_time_stamp from spice_common.h so
it's not really useful to keep it there.
---
 common/spice_common.h |    7 -------
 server/main_channel.c |    7 +++++++
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/common/spice_common.h b/common/spice_common.h
index d324ca1..bc74486 100644
--- a/common/spice_common.h
+++ b/common/spice_common.h
@@ -63,11 +63,4 @@
     }                                                               \
 } while (0)
 
-static inline uint64_t get_time_stamp(void)
-{
-    struct timespec time_space;
-    clock_gettime(CLOCK_MONOTONIC, &time_space);
-    return time_space.tv_sec * 1000 * 1000 * 1000 + time_space.tv_nsec;
-}
-
 #endif
diff --git a/server/main_channel.c b/server/main_channel.c
index e0fa1e4..1a6a89c 100644
--- a/server/main_channel.c
+++ b/server/main_channel.c
@@ -489,6 +489,13 @@ void main_channel_push_notify(Channel *channel, uint8_t *mess, const int mess_le
     red_channel_pipe_add_push(&main_chan->base, &item->base);
 }
 
+static uint64_t get_time_stamp(void)
+{
+    struct timespec time_space;
+    clock_gettime(CLOCK_MONOTONIC, &time_space);
+    return time_space.tv_sec * 1000 * 1000 * 1000 + time_space.tv_nsec;
+}
+
 static void main_channel_marshall_notify(SpiceMarshaller *m, NotifyPipeItem *item)
 {
     SpiceMsgNotify notify;
-- 
1.7.4.4



More information about the Spice-devel mailing list