timers.hpp 914 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // timers.hpp --------------------------------------------------------------//
  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. #ifndef BOOST_DETAIL_WINAPI_TIMERS_HPP
  6. #define BOOST_DETAIL_WINAPI_TIMERS_HPP
  7. #include <boost/detail/winapi/basic_types.hpp>
  8. #ifdef BOOST_HAS_PRAGMA_ONCE
  9. #pragma once
  10. #endif
  11. namespace boost
  12. {
  13. namespace detail
  14. {
  15. namespace winapi
  16. {
  17. #if defined( BOOST_USE_WINDOWS_H )
  18. using ::QueryPerformanceCounter;
  19. using ::QueryPerformanceFrequency;
  20. #else
  21. extern "C" {
  22. __declspec(dllimport) BOOL_ WINAPI
  23. QueryPerformanceCounter(
  24. LARGE_INTEGER_ *lpPerformanceCount
  25. );
  26. __declspec(dllimport) BOOL_ WINAPI
  27. QueryPerformanceFrequency(
  28. LARGE_INTEGER_ *lpFrequency
  29. );
  30. }
  31. #endif
  32. }
  33. }
  34. }
  35. #endif // BOOST_DETAIL_WINAPI_TIMERS_HPP