Skip to content

Commit 5c59bab

Browse files
committed
use BOOST_TEST_LT
1 parent 053f52a commit 5c59bab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/sync/mutual_exclusion/locks/unique_lock/cons/time_point_pass.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ void f2()
5555
boost::unique_lock<boost::timed_mutex> lk(m, Clock::now() + ms(250));
5656
BOOST_TEST(lk.owns_lock() == false);
5757
t1 = Clock::now();
58-
ns d = t1 - t0 - ms(250);
59-
BOOST_TEST(d < max_diff);
58+
ms d = boost::chrono::duration_cast<boost::chrono::milliseconds>(t1 - t0) - ms(250);
59+
BOOST_TEST_LT(d/ms(1), max_diff/ms(1));
6060
}
6161

6262
int main()

0 commit comments

Comments
 (0)