clock_name.cpp 616 B

1234567891011121314151617181920
  1. // stopclock_perf.cpp ---------------------------------------------------//
  2. // Copyright 2009 Vicente J. Botet Escriba
  3. // Distributed under the Boost Software License, Version 1.0.
  4. // See http://www.boost.org/LICENSE_1_0.txt
  5. // See http://www.boost.org/libs/chrono for documentation.
  6. #include "clock_name.hpp"
  7. #include <iostream>
  8. int main()
  9. {
  10. std::cout << name<boost::chrono::system_clock>::apply() << '\n';
  11. #ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
  12. std::cout << name<boost::chrono::steady_clock>::apply() << '\n';
  13. #endif
  14. std::cout << name<boost::chrono::high_resolution_clock>::apply() << '\n';
  15. }