2
0
mirror of https://github.com/boostorg/sync.git synced 2026-01-19 04:42:12 +00:00

Added a workaround for the case when std::time performs rounding.

This commit is contained in:
Andrey Semashev
2019-10-13 23:26:20 +03:00
parent ae474ad1d5
commit 4d75adf846

View File

@@ -52,6 +52,11 @@ void test_std_chrono_system_clock_time_t_now_mismatch()
{
BOOST_TEST_EQ((t2 - t1), 1);
}
// std::time may also be implemented on top of system clock and perform arithmetic rounding
else if (t1 > t2)
{
BOOST_TEST_EQ((t1 - t2), 1);
}
else
{
BOOST_TEST_EQ(t1, t2);