Skip to content
Permalink
Browse files

rollback MONOTONIC_CLOCK change as it seems it introduce regressions.

  • Loading branch information
viboes committed Feb 24, 2017
1 parent 544eda5 commit 9bbf9bed80836282263ec0bdea0adf5c1fa3621b
Showing with 16 additions and 1 deletion.
  1. +16 −1 include/boost/thread/pthread/timespec.hpp
@@ -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;
@@ -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;

0 comments on commit 9bbf9be

Please sign in to comment.
You can’t perform that action at this time.