1 //
2 // steady_timer.hpp
3 // ~~~~~~~~~~~~~~~~
4 //
5 // Copyright (c) 2003-2018 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 ASIO_STEADY_TIMER_HPP
12 #define ASIO_STEADY_TIMER_HPP
13 
14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
15 # pragma once
16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
17 
18 #include "asio/detail/config.hpp"
19 
20 #if defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
21 
22 #include "asio/basic_waitable_timer.hpp"
23 #include "asio/detail/chrono.hpp"
24 
25 namespace asio {
26 
27 /// Typedef for a timer based on the steady clock.
28 /**
29  * This typedef uses the C++11 @c <chrono> standard library facility, if
30  * available. Otherwise, it may use the Boost.Chrono library. To explicitly
31  * utilise Boost.Chrono, use the basic_waitable_timer template directly:
32  * @code
33  * typedef basic_waitable_timer<boost::chrono::steady_clock> timer;
34  * @endcode
35  */
36 typedef basic_waitable_timer<chrono::steady_clock> steady_timer;
37 
38 } // namespace asio
39 
40 #endif // defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
41 
42 #endif // ASIO_STEADY_TIMER_HPP
43