BOOST_ASIO_HAS_STD_CHRONO是指定boost库中使用c++11的std::chrono。在vs2013版本之后,编译的时候自定义了这个宏。
可以通过BOOST_ASIO_DISABLE_STD_CHRONO禁用std::chrono
在boost/asio/detail/config.hpp中
//chrono的标准库支持。 一些标准库(例如gcc 4.6附带的libstdc ++)按照早期的C ++ 0x草案提供了//monotonic_clock,而不是使用steady_clock的最终标准化名称。
// Standard library support for chrono. Some standard libraries (such as the
// libstdc++ shipped with gcc 4.6) provide monotonic_clock as per early C++0x
// drafts, rather than the eventually standardised name of steady_clock.
#if !defined(BOOST_ASIO_HAS_STD_CHRONO)
# if !defined(BOOST_ASIO_DISABLE_STD_CHRONO)
# if defined(__clang__)
# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
# define BOOST_ASIO_HAS_STD_CHRONO 1
# elif (__cplusplus >= 201103)
# if __has_include(<chrono>)
# define BOOST_ASIO_HAS_STD_CHRONO 1
# endif // __has_include(<chrono>)
# endif // (__cplusplus >= 201103)
# endif // defined(__clang__)
# if defined(__GNUC__)
# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
# if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
# define BOOST_ASIO_HAS_STD_CHRONO 1
# if ((__GNUC__ == 4) && (__GNUC_MINOR__ == 6))
# define BOOST_ASIO_HAS_STD_CHRONO_MONOTONIC_CLOCK 1
# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ == 6))
# endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
# endif // defined(__GNUC__)
# if defined(BOOST_ASIO_MSVC)
# if (_MSC_VER >= 1700)
# define BOOST_ASIO_HAS_STD_CHRONO 1
# endif // (_MSC_VER >= 1700)
# endif // defined(BOOST_ASIO_MSVC)
# endif // !defined(BOOST_ASIO_DISABLE_STD_CHRONO)
#endif // !defined(BOOST_ASIO_HAS_STD_CHRONO)