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