#include <boost/thread/null_mutex.hpp>
#include <boost/thread/thread.hpp>
#include <boost/detail/lightweight_test.hpp>
-
-
+#include "../../../timming.hpp"
boost::null_mutex m;
#if defined BOOST_THREAD_USES_CHRONO
-typedef boost::chrono::system_clock Clock;
+typedef boost::chrono::high_resolution_clock Clock;
typedef Clock::time_point time_point;
typedef Clock::duration duration;
typedef boost::chrono::milliseconds ms;
#else
#endif
-#ifdef BOOST_THREAD_PLATFORM_WIN32
-const ms max_diff(250);
-#else
-const ms max_diff(50);
-#endif
+const ms max_diff(BOOST_THREAD_TEST_TIME_MS);
void f()
{
m.unlock();
m.unlock();
ns d = t1 - t0 ;
- BOOST_TEST(d < max_diff);
+ BOOST_THREAD_TEST_IT(d, ns(max_diff));
#else
//time_point t0 = Clock::now();
m.lock();