• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2010 Vicente J. Botet Escriba
3  * Copyright 2015 Andrey Semashev
4  *
5  * Distributed under the Boost Software License, Version 1.0.
6  * See http://www.boost.org/LICENSE_1_0.txt
7  */
8 
9 #ifndef BOOST_WINAPI_TIMERS_HPP_INCLUDED_
10 #define BOOST_WINAPI_TIMERS_HPP_INCLUDED_
11 
12 #include <boost/winapi/basic_types.hpp>
13 #include <boost/winapi/detail/header.hpp>
14 
15 #ifdef BOOST_HAS_PRAGMA_ONCE
16 #pragma once
17 #endif
18 
19 #if !defined( BOOST_USE_WINDOWS_H )
20 extern "C" {
21 BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
22 QueryPerformanceCounter(::_LARGE_INTEGER* lpPerformanceCount);
23 
24 BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC
25 QueryPerformanceFrequency(::_LARGE_INTEGER* lpFrequency);
26 } // extern "C"
27 #endif
28 
29 
30 namespace boost {
31 namespace winapi {
32 
QueryPerformanceCounter(LARGE_INTEGER_ * lpPerformanceCount)33 BOOST_FORCEINLINE BOOL_ QueryPerformanceCounter(LARGE_INTEGER_* lpPerformanceCount)
34 {
35     return ::QueryPerformanceCounter(reinterpret_cast< ::_LARGE_INTEGER* >(lpPerformanceCount));
36 }
37 
QueryPerformanceFrequency(LARGE_INTEGER_ * lpFrequency)38 BOOST_FORCEINLINE BOOL_ QueryPerformanceFrequency(LARGE_INTEGER_* lpFrequency)
39 {
40     return ::QueryPerformanceFrequency(reinterpret_cast< ::_LARGE_INTEGER* >(lpFrequency));
41 }
42 
43 }
44 }
45 
46 #include <boost/winapi/detail/footer.hpp>
47 
48 #endif // BOOST_WINAPI_TIMERS_HPP_INCLUDED_
49