[Libreoffice-commits] core.git: sal/osl

Mark Wielaard mark at klomp.org
Mon May 20 07:25:33 PDT 2013


 sal/osl/unx/time.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 9b76439dff638d6fd773f2b63c377c2124810a39
Author: Mark Wielaard <mark at klomp.org>
Date:   Mon May 20 15:57:36 2013 +0200

    sal osl_getGlobalTimer: Don't confuse start and current time.
    
    Change-Id: I575dd70d6b80d4f3279476037e509550cfa23fde
    Reviewed-on: https://gerrit.libreoffice.org/3979
    Reviewed-by: Tor Lillqvist <tml at iki.fi>
    Tested-by: Tor Lillqvist <tml at iki.fi>

diff --git a/sal/osl/unx/time.c b/sal/osl/unx/time.c
index 94a935e..227f502 100644
--- a/sal/osl/unx/time.c
+++ b/sal/osl/unx/time.c
@@ -298,8 +298,6 @@ sal_uInt32 SAL_CALL osl_getGlobalTimer()
     sal_uInt32 nSeconds;
 
 #if defined(MACOSX) || defined(IOS)
-    startTime = mach_absolute_time();
-
     double diff = (double)(mach_absolute_time() - startTime) * adjust_time_factor * 1000;
     nSeconds = (sal_uInt32)diff;
 #else
@@ -307,9 +305,9 @@ sal_uInt32 SAL_CALL osl_getGlobalTimer()
     int res;
 
 #if defined(USE_CLOCK_GETTIME)
-    res = clock_gettime(CLOCK_REALTIME, &startTime);
+    res = clock_gettime(CLOCK_REALTIME, &currentTime);
 #else
-    res = gettimeofday( &startTime, NULL );
+    res = gettimeofday( &currentTime, NULL );
 #endif
     assert(res == 0);
 


More information about the Libreoffice-commits mailing list