Skip to content

Commit

Permalink
rollback MONOTONIC_CLOCK change as it seems it introduce regressions.
Browse files Browse the repository at this point in the history
  • Loading branch information
viboes committed Feb 24, 2017
1 parent 544eda5 commit 9bbf9be
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion include/boost/thread/pthread/timespec.hpp
Expand Up @@ -75,7 +75,7 @@ namespace boost
{
timespec ts;

#ifdef CLOCK_MONOTONIC
#ifdef BOOST_THREAD_TIMESPEC_CLOCK_MONOTONIC
if ( ::clock_gettime( CLOCK_MONOTONIC, &ts ) )
{
ts.tv_sec = 0;
Expand All @@ -98,6 +98,21 @@ namespace boost
return ts;
}

#ifdef CLOCK_MONOTONIC
inline timespec timespec_now_monotonic()
{
timespec ts;

if ( ::clock_gettime( CLOCK_MONOTONIC, &ts ) )
{
ts.tv_sec = 0;
ts.tv_nsec = 0;
BOOST_ASSERT(0 && "Boost::Thread - Internal Error");
}
return ts;
}
#endif

inline timespec timespec_zero()
{
timespec ts;
Expand Down

0 comments on commit 9bbf9be

Please sign in to comment.