5 // Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
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)
11 #ifndef BOOST_ASIO_SYSTEM_TIMER_HPP
12 #define BOOST_ASIO_SYSTEM_TIMER_HPP
14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
18 #include <boost/asio/detail/config.hpp>
20 #if defined(BOOST_ASIO_HAS_STD_CHRONO) \
21 || defined(BOOST_ASIO_HAS_BOOST_CHRONO) \
22 || defined(GENERATING_DOCUMENTATION)
24 #if defined(BOOST_ASIO_HAS_STD_CHRONO)
26 #elif defined(BOOST_ASIO_HAS_BOOST_CHRONO)
27 # include <boost/chrono/system_clocks.hpp>
30 #include <boost/asio/basic_waitable_timer.hpp>
35 #if defined(GENERATING_DOCUMENTATION)
36 /// Typedef for a timer based on the system clock.
38 * This typedef uses the C++11 @c <chrono> standard library facility, if
39 * available. Otherwise, it may use the Boost.Chrono library. To explicitly
40 * utilise Boost.Chrono, use the basic_waitable_timer template directly:
42 * typedef basic_waitable_timer<boost::chrono::system_clock> timer;
45 typedef basic_waitable_timer<chrono::system_clock> system_timer;
46 #elif defined(BOOST_ASIO_HAS_STD_CHRONO)
47 typedef basic_waitable_timer<std::chrono::system_clock> system_timer;
48 #elif defined(BOOST_ASIO_HAS_BOOST_CHRONO)
49 typedef basic_waitable_timer<boost::chrono::system_clock> system_timer;
55 #endif // defined(BOOST_ASIO_HAS_STD_CHRONO)
56 // || defined(BOOST_ASIO_HAS_BOOST_CHRONO)
57 // || defined(GENERATING_DOCUMENTATION)
59 #endif // BOOST_ASIO_SYSTEM_TIMER_HPP