• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1  // Copyright (C) 2018 Vicente Botet
2  //
3  //  Distributed under the Boost Software License, Version 1.0. (See accompanying
4  //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5  
6  #ifndef BOOST_THREAD_TEST_TIMMING_HPP
7  #define BOOST_THREAD_TEST_TIMMING_HPP
8  
9  #include <boost/thread/detail/config.hpp>
10  #include <boost/detail/lightweight_test.hpp>
11  
12  #if ! defined BOOST_THREAD_TEST_TIME_MS
13  #ifdef __linux__
14  #define BOOST_THREAD_TEST_TIME_MS 75
15  #else
16  // Windows, Cygwin, macOS all need this
17  #define BOOST_THREAD_TEST_TIME_MS 250
18  #endif
19  #endif
20  
21  #if ! defined BOOST_THREAD_TEST_TIME_WARNING
22  #define BOOST_THREAD_TEST_IT(A, B) BOOST_TEST_LT((A).count(), (B).count())
23  #else
24  #define BOOST_THREAD_TEST_IT(A, B) BOOST_TEST_LT((A).count(), (B).count())
25  #endif
26  
27  #endif
28