one_obj.cpp 646 B

1234567891011121314151617181920212223
  1. // boost win32_test.cpp -----------------------------------------------------//
  2. // Copyright 2010 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 <iostream>
  7. #include <boost/chrono/chrono.hpp>
  8. #include <boost/chrono/chrono_io.hpp>
  9. void another();
  10. int main()
  11. {
  12. boost::chrono::steady_clock::time_point t1=boost::chrono::steady_clock::now();
  13. another();
  14. boost::chrono::steady_clock::time_point t2=boost::chrono::steady_clock::now();
  15. std::cout << t2-t1 << std::endl;
  16. return 0;
  17. }