]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/thread/test/sync/mutual_exclusion/locks/lock_guard/make_lock_guard_adopt_lock_pass.cpp
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / boost / libs / thread / test / sync / mutual_exclusion / locks / lock_guard / make_lock_guard_adopt_lock_pass.cpp
index 3343eecbee362b1d3ade686d02ca85275c17f605..489f66f18475df3276305529632f90416d368583 100644 (file)
@@ -36,6 +36,12 @@ boost::mutex m;
 
 #if ! defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && ! defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && ! defined BOOST_THREAD_NO_MAKE_LOCK_GUARD
 
+#ifdef BOOST_THREAD_PLATFORM_WIN32
+const ms max_diff(250);
+#else
+const ms max_diff(75);
+#endif
+
 void f()
 {
 #ifdef BOOST_THREAD_USES_CHRONO
@@ -48,7 +54,7 @@ void f()
     t1 = Clock::now();
   }
   ns d = t1 - t0 - ms(250);
-  BOOST_TEST(d < ns(2500000)+ms(1000)); // within 2.5ms
+  BOOST_TEST(d < max_diff);
 #else
   //time_point t0 = Clock::now();
   //time_point t1;
@@ -58,7 +64,7 @@ void f()
     //t1 = Clock::now();
   }
   //ns d = t1 - t0 - ms(250);
-  //BOOST_TEST(d < ns(2500000)+ms(1000)); // within 2.5ms
+  //BOOST_TEST(d < max_diff);
 #endif
 }
 #endif