Subject: [Boost-bugs] [Boost C++ Libraries] #5543: Thread clock compatibility problems on Android
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-05-14 18:58:55
#5543: Thread clock compatibility problems on Android
---------------------------------------------+------------------------------
Reporter: Libor Bus <libor.bus@â¦> | Owner: viboes
Type: Bugs | Status: new
Milestone: To Be Determined | Component: chrono
Version: Boost Development Trunk | Severity: Problem
Keywords: |
---------------------------------------------+------------------------------
There are compatibility problems of chrono library on Android (Android
2.2, NDK-r5b, chrono v0.71, rev #71693):
1) Sources with boost::chrono::thread_clock does not compile, since
_POSIX_THREAD_CPUTIME is not defined on Android. My workaround is to hack
chrono/config.hpp:
# if 1 //defined(_POSIX_THREAD_CPUTIME)
# define BOOST_CHRONO_HAS_THREAD_CLOCK
# define BOOST_CHRONO_THREAD_CLOCK_IS_MONOTONIC true
# endif
2) ::clock_gettime() fails when called with clock ID got from
pthread_getcpuclockid. My workaround is to call ::clock_gettime(
CLOCK_THREAD_CPUTIME_ID, &ts ) in
chrono/detail/inlined/posix/thread_clock.hpp.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5543> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:06 UTC