5 // Copyright (c) 2003-2019 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_DETAIL_CHRONO_HPP
12 #define BOOST_ASIO_DETAIL_CHRONO_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)
22 #elif defined(BOOST_ASIO_HAS_BOOST_CHRONO)
23 # include <boost/chrono/system_clocks.hpp>
24 #endif // defined(BOOST_ASIO_HAS_BOOST_CHRONO)
30 #if defined(BOOST_ASIO_HAS_STD_CHRONO)
31 using std::chrono::duration;
32 using std::chrono::time_point;
33 using std::chrono::duration_cast;
34 using std::chrono::nanoseconds;
35 using std::chrono::microseconds;
36 using std::chrono::milliseconds;
37 using std::chrono::seconds;
38 using std::chrono::minutes;
39 using std::chrono::hours;
40 using std::chrono::time_point_cast;
41 #if defined(BOOST_ASIO_HAS_STD_CHRONO_MONOTONIC_CLOCK)
42 typedef std::chrono::monotonic_clock steady_clock;
43 #else // defined(BOOST_ASIO_HAS_STD_CHRONO_MONOTONIC_CLOCK)
44 using std::chrono::steady_clock;
45 #endif // defined(BOOST_ASIO_HAS_STD_CHRONO_MONOTONIC_CLOCK)
46 using std::chrono::system_clock;
47 using std::chrono::high_resolution_clock;
48 #elif defined(BOOST_ASIO_HAS_BOOST_CHRONO)
49 using boost::chrono::duration;
50 using boost::chrono::time_point;
51 using boost::chrono::duration_cast;
52 using boost::chrono::nanoseconds;
53 using boost::chrono::microseconds;
54 using boost::chrono::milliseconds;
55 using boost::chrono::seconds;
56 using boost::chrono::minutes;
57 using boost::chrono::hours;
58 using boost::chrono::time_point_cast;
59 using boost::chrono::system_clock;
60 using boost::chrono::steady_clock;
61 using boost::chrono::high_resolution_clock;
62 #endif // defined(BOOST_ASIO_HAS_BOOST_CHRONO)
68 #endif // BOOST_ASIO_DETAIL_CHRONO_HPP