diff --git a/include/boost/thread/detail/thread.hpp b/include/boost/thread/detail/thread.hpp index 46d96693..46294102 100644 --- a/include/boost/thread/detail/thread.hpp +++ b/include/boost/thread/detail/thread.hpp @@ -594,7 +594,7 @@ namespace boost #endif #if defined BOOST_THREAD_USES_DATETIME - inline BOOST_SYMBOL_VISIBLE void sleep(xtime const& abs_time) + inline BOOST_SYMBOL_VISIBLE void sleep(::boost::xtime const& abs_time) { sleep(system_time(abs_time)); } diff --git a/include/boost/thread/pthread/condition_variable.hpp b/include/boost/thread/pthread/condition_variable.hpp index 285785ff..c11383f0 100644 --- a/include/boost/thread/pthread/condition_variable.hpp +++ b/include/boost/thread/pthread/condition_variable.hpp @@ -249,7 +249,7 @@ namespace boost #endif } template - bool timed_wait(lock_type& m,xtime const& abs_time) + bool timed_wait(lock_type& m,::boost::xtime const& abs_time) { return timed_wait(m,system_time(abs_time)); } @@ -309,7 +309,7 @@ namespace boost } template - bool timed_wait(lock_type& m,xtime const& abs_time, predicate_type pred) + bool timed_wait(lock_type& m,::boost::xtime const& abs_time, predicate_type pred) { return timed_wait(m,system_time(abs_time),pred); } diff --git a/include/boost/thread/pthread/condition_variable_fwd.hpp b/include/boost/thread/pthread/condition_variable_fwd.hpp index dc471d56..08b15834 100644 --- a/include/boost/thread/pthread/condition_variable_fwd.hpp +++ b/include/boost/thread/pthread/condition_variable_fwd.hpp @@ -128,7 +128,7 @@ namespace boost } bool timed_wait( unique_lock& m, - xtime const& abs_time) + ::boost::xtime const& abs_time) { return timed_wait(m,system_time(abs_time)); } @@ -194,7 +194,7 @@ namespace boost template bool timed_wait( unique_lock& m, - xtime const& abs_time,predicate_type pred) + ::boost::xtime const& abs_time,predicate_type pred) { return timed_wait(m,system_time(abs_time),pred); } diff --git a/include/boost/thread/xtime.hpp b/include/boost/thread/xtime.hpp index 9c6a3596..d6b7ad10 100644 --- a/include/boost/thread/xtime.hpp +++ b/include/boost/thread/xtime.hpp @@ -57,17 +57,17 @@ struct xtime }; -inline xtime get_xtime(boost::system_time const& abs_time) +inline ::boost::xtime get_xtime(boost::system_time const& abs_time) { - xtime res; + ::boost::xtime res; boost::posix_time::time_duration const time_since_epoch=abs_time-boost::posix_time::from_time_t(0); - res.sec=static_cast(time_since_epoch.total_seconds()); - res.nsec=static_cast(time_since_epoch.fractional_seconds()*(1000000000/time_since_epoch.ticks_per_second())); + res.sec=static_cast<::boost::xtime::xtime_sec_t>(time_since_epoch.total_seconds()); + res.nsec=static_cast<::boost::xtime::xtime_nsec_t>(time_since_epoch.fractional_seconds()*(1000000000/time_since_epoch.ticks_per_second())); return res; } -inline int xtime_get(struct xtime* xtp, int clock_type) +inline int xtime_get(struct ::boost::xtime* xtp, int clock_type) { if (clock_type == TIME_UTC_) { @@ -78,7 +78,7 @@ inline int xtime_get(struct xtime* xtp, int clock_type) } -inline int xtime_cmp(const xtime& xt1, const xtime& xt2) +inline int xtime_cmp(const ::boost::xtime& xt1, const ::boost::xtime& xt2) { if (xt1.sec == xt2.sec) return (int)(xt1.nsec - xt2.nsec); diff --git a/src/pthread/thread.cpp b/src/pthread/thread.cpp index f8fc44a1..b77f28df 100644 --- a/src/pthread/thread.cpp +++ b/src/pthread/thread.cpp @@ -470,7 +470,7 @@ namespace boost # elif defined(BOOST_HAS_PTHREAD_YIELD) BOOST_VERIFY(!pthread_yield()); //# elif defined BOOST_THREAD_USES_DATETIME -// xtime xt; +// ::boost::xtime xt; // xtime_get(&xt, TIME_UTC_); // sleep(xt); // sleep_for(chrono::milliseconds(0));