1 | // |
2 | // detail/chrono.hpp |
3 | // ~~~~~~~~~~~~~~~~~ |
4 | // |
5 | // Copyright (c) 2003-2024 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 | #ifndef BOOST_ASIO_DETAIL_CHRONO_HPP |
12 | #define BOOST_ASIO_DETAIL_CHRONO_HPP |
13 | |
14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) |
15 | # pragma once |
16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) |
17 | |
18 | #include <boost/asio/detail/config.hpp> |
19 | #include <chrono> |
20 | |
21 | namespace boost { |
22 | namespace asio { |
23 | namespace chrono { |
24 | |
25 | using std::chrono::duration; |
26 | using std::chrono::time_point; |
27 | using std::chrono::duration_cast; |
28 | using std::chrono::nanoseconds; |
29 | using std::chrono::microseconds; |
30 | using std::chrono::milliseconds; |
31 | using std::chrono::seconds; |
32 | using std::chrono::minutes; |
33 | using std::chrono::hours; |
34 | using std::chrono::time_point_cast; |
35 | #if defined(BOOST_ASIO_HAS_STD_CHRONO_MONOTONIC_CLOCK) |
36 | typedef std::chrono::monotonic_clock steady_clock; |
37 | #else // defined(BOOST_ASIO_HAS_STD_CHRONO_MONOTONIC_CLOCK) |
38 | using std::chrono::steady_clock; |
39 | #endif // defined(BOOST_ASIO_HAS_STD_CHRONO_MONOTONIC_CLOCK) |
40 | using std::chrono::system_clock; |
41 | using std::chrono::high_resolution_clock; |
42 | |
43 | } // namespace chrono |
44 | } // namespace asio |
45 | } // namespace boost |
46 | |
47 | #endif // BOOST_ASIO_DETAIL_CHRONO_HPP |
48 | |