Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
1.9KB

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