diff options
Diffstat (limited to 'src/boost/libs/thread/test/timming.hpp')
-rw-r--r-- | src/boost/libs/thread/test/timming.hpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/boost/libs/thread/test/timming.hpp b/src/boost/libs/thread/test/timming.hpp new file mode 100644 index 000000000..6ae320e8d --- /dev/null +++ b/src/boost/libs/thread/test/timming.hpp @@ -0,0 +1,27 @@ +// Copyright (C) 2018 Vicente Botet +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_THREAD_TEST_TIMMING_HPP +#define BOOST_THREAD_TEST_TIMMING_HPP + +#include <boost/thread/detail/config.hpp> +#include <boost/detail/lightweight_test.hpp> + +#if ! defined BOOST_THREAD_TEST_TIME_MS +#ifdef __linux__ +#define BOOST_THREAD_TEST_TIME_MS 75 +#else +// Windows, Cygwin, macOS all need this +#define BOOST_THREAD_TEST_TIME_MS 250 +#endif +#endif + +#if ! defined BOOST_THREAD_TEST_TIME_WARNING +#define BOOST_THREAD_TEST_IT(A, B) BOOST_TEST_LT((A).count(), (B).count()) +#else +#define BOOST_THREAD_TEST_IT(A, B) BOOST_TEST_LT((A).count(), (B).count()) +#endif + +#endif |