summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2013-05-20 15:57:36 +0200
committerTor Lillqvist <tml@iki.fi>2013-05-20 14:25:15 +0000
commit9b76439dff638d6fd773f2b63c377c2124810a39 (patch)
tree04f29daba96615cb1a671cc26d9975887d5ab399 /sal
parentc6e576da95074215d1dcfbcc4b7c4fad6cdeb27c (diff)
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@iki.fi> Tested-by: Tor Lillqvist <tml@iki.fi>
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/time.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sal/osl/unx/time.c b/sal/osl/unx/time.c
index 94a935e93296..227f502b1176 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);