]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/thread/test/sync/mutual_exclusion/locks/shared_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 / shared_lock_guard / adopt_lock_pass.cpp
index 12a0202b5b864d030c6f07ef741be6c02cfbc6b9..9004370a7c3208aea81772b7d42f608c2868e80b 100644 (file)
@@ -34,6 +34,12 @@ typedef boost::chrono::nanoseconds ns;
 
 boost::shared_mutex m;
 
+#ifdef BOOST_THREAD_PLATFORM_WIN32
+const ms max_diff(250);
+#else
+const ms max_diff(75);
+#endif
+
 void f()
 {
 #if defined BOOST_THREAD_USES_CHRONO
@@ -45,7 +51,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;
@@ -55,7 +61,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
 }