test_7666.cpp 458 B

1234567891011121314151617181920212223
  1. // Copyright (C) 2010 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. #define BOOST_CHRONO_VERSION 2
  6. #define BOOST_THREAD_VERSION 2
  7. #include <boost/thread/thread_only.hpp>
  8. void myFunc()
  9. {
  10. boost::this_thread::sleep(boost::posix_time::seconds(5));
  11. }
  12. int main(int, char **)
  13. {
  14. boost::thread p(myFunc);
  15. p.join();
  16. return 0;
  17. }