]>
Commit | Line | Data |
---|---|---|
1 | // | |
2 | // timer.cpp | |
3 | // ~~~~~~~~~ | |
4 | // | |
5 | // Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) | |
6 | // | |
7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying | |
8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
9 | // | |
10 | ||
11 | #include <iostream> | |
12 | #include <boost/asio.hpp> | |
13 | #include <boost/date_time/posix_time/posix_time.hpp> | |
14 | ||
15 | int main() | |
16 | { | |
17 | boost::asio::io_context io; | |
18 | ||
19 | boost::asio::deadline_timer t(io, boost::posix_time::seconds(5)); | |
20 | t.wait(); | |
21 | ||
22 | std::cout << "Hello, world!" << std::endl; | |
23 | ||
24 | return 0; | |
25 | } |