Index: libs/thread/test/threads/this_thread/sleep_until/sleep_until_pass.cpp =================================================================== --- libs/thread/test/threads/this_thread/sleep_until/sleep_until_pass.cpp (revision 78797) +++ libs/thread/test/threads/this_thread/sleep_until/sleep_until_pass.cpp (working copy) @@ -16,7 +16,7 @@ // thread::id this_thread::get_id(); #include -#include +#include #include @@ -35,7 +35,7 @@ boost::chrono::nanoseconds err = ms / 100; // The time slept is within 1% of 500ms // This test is spurious as it depends on the time the thread system switches the threads - BOOST_TEST(std::abs(static_cast(ns.count())) < (err+boost::chrono::milliseconds(1000)).count()); + BOOST_TEST(std::max(ns, -ns) < (err+boost::chrono::milliseconds(1000))); } Index: libs/thread/test/threads/this_thread/sleep_for/sleep_for_pass.cpp =================================================================== --- libs/thread/test/threads/this_thread/sleep_for/sleep_for_pass.cpp (revision 78797) +++ libs/thread/test/threads/this_thread/sleep_for/sleep_for_pass.cpp (working copy) @@ -16,7 +16,7 @@ // thread::id this_thread::get_id(); #include -#include +#include #include @@ -35,7 +35,7 @@ boost::chrono::nanoseconds err = ms / 100; // The time slept is within 1% of 500ms // This test is spurious as it depends on the time the thread system switches the threads - BOOST_TEST(std::abs(static_cast(ns.count())) < (err+boost::chrono::milliseconds(1000)).count()); + BOOST_TEST(std::max(ns, -ns) < (err/*+boost::chrono::milliseconds(1000)*/)); return boost::report_errors(); }