diff options
author | Martin Smith <msmith@trolltech.com> | 2010-03-30 13:04:01 +0200 |
---|---|---|
committer | Martin Smith <msmith@trolltech.com> | 2010-03-30 13:04:01 +0200 |
commit | ff968f44124322f5cda47cc7eced79ccaf23de80 (patch) | |
tree | e957f1a602b1518aba9a24fb4553b18b6b85a8ec /src/corelib/tools/qelapsedtimer_unix.cpp | |
parent | 2d9260e863ff2e3a5bb77d37b2b9b90072bce825 (diff) | |
parent | 08072b17a19bf9a99fbc8a494baa5528725fec1a (diff) | |
download | qt4-tools-ff968f44124322f5cda47cc7eced79ccaf23de80.tar.gz |
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Diffstat (limited to 'src/corelib/tools/qelapsedtimer_unix.cpp')
-rw-r--r-- | src/corelib/tools/qelapsedtimer_unix.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/tools/qelapsedtimer_unix.cpp b/src/corelib/tools/qelapsedtimer_unix.cpp index 85d7fa81db..2c4ea584ea 100644 --- a/src/corelib/tools/qelapsedtimer_unix.cpp +++ b/src/corelib/tools/qelapsedtimer_unix.cpp @@ -74,7 +74,7 @@ bool QElapsedTimer::isMonotonic() static int returnValue = 0; if (returnValue == 0) { -# if (_POSIX_MONOTONIC_CLOCK-0 < 0) +# if (_POSIX_MONOTONIC_CLOCK-0 < 0) || !defined(_SC_MONOTONIC_CLOCK) returnValue = -1; # elif (_POSIX_MONOTONIC_CLOCK == 0) // detect if the system support monotonic timers @@ -97,19 +97,19 @@ static inline QPair<long, long> do_gettime() #if (_POSIX_MONOTONIC_CLOCK-0 > 0) timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts); - return qMakePair(ts.tv_sec, ts.tv_nsec); + return qMakePair<long,long>(ts.tv_sec, ts.tv_nsec); #else # if !defined(QT_NO_CLOCK_MONOTONIC) && !defined(QT_BOOTSTRAPPED) if (QElapsedTimer::isMonotonic()) { timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts); - return qMakePair(ts.tv_sec, ts.tv_nsec); + return qMakePair<long,long>(ts.tv_sec, ts.tv_nsec); } # endif // use gettimeofday timeval tv; ::gettimeofday(&tv, 0); - return qMakePair(tv.tv_sec, tv.tv_usec); + return qMakePair<long,long>(tv.tv_sec, tv.tv_usec); #endif } |