[Spice-commits] 2 commits - configure.ac server/spice_timer_queue.c

Christophe Fergau teuf at kemper.freedesktop.org
Mon Jun 29 08:50:37 PDT 2015


 configure.ac               |    5 +----
 server/spice_timer_queue.c |    2 +-
 2 files changed, 2 insertions(+), 5 deletions(-)

New commits:
commit a45ff74b3d1c202e32e29be5845100bd3dfc845b
Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Thu Jun 11 19:20:01 2015 +0200

    server: Fix an incorrect time calculation.
    
    Signed-off-by: Francois Gouget <fgouget at codeweavers.com>

diff --git a/server/spice_timer_queue.c b/server/spice_timer_queue.c
index 71de84a..d457845 100644
--- a/server/spice_timer_queue.c
+++ b/server/spice_timer_queue.c
@@ -233,7 +233,7 @@ unsigned int spice_timer_queue_get_timeout_ms(void)
     head_timer = SPICE_CONTAINEROF(head, SpiceTimer, active_link);
 
     clock_gettime(CLOCK_MONOTONIC, &now);
-    now_ms = ((int64_t)now.tv_sec * 1000) - (now.tv_nsec / 1000 / 1000);
+    now_ms = ((int64_t)now.tv_sec * 1000) + (now.tv_nsec / 1000 / 1000);
 
     return MAX(0, ((int64_t)head_timer->expiry_time - now_ms));
 }
commit 4ad3025249c1daea55fa7c0322258796ecab99c4
Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Thu Jun 11 19:38:29 2015 +0200

    HAVE_CLOCK_GETTIME is not used so remove it.
    
    Signed-off-by: Francois Gouget <fgouget at codeweavers.com>

diff --git a/configure.ac b/configure.ac
index 9c92cc6..5b4caa4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -98,10 +98,7 @@ AC_SUBST(COMMON_CFLAGS)
 AC_CHECK_LIBM
 AC_SUBST(LIBM)
 
-AC_CHECK_LIB(rt, clock_gettime,
-   AC_DEFINE([HAVE_CLOCK_GETTIME], 1, [Defined if we have clock_gettime()])
-   LIBRT=-lrt
-   )
+AC_CHECK_LIB(rt, clock_gettime, LIBRT="-lrt")
 AC_SUBST(LIBRT)
 
 AS_VAR_APPEND([SPICE_NONPKGCONFIG_LIBS], [" -pthread $LIBM $LIBRT"])


More information about the Spice-commits mailing list