]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/winapi/include/boost/detail/winapi/get_thread_times.hpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / winapi / include / boost / detail / winapi / get_thread_times.hpp
1 // get_thread_times.hpp --------------------------------------------------------------//
2
3 // Copyright 2010 Vicente J. Botet Escriba
4 // Copyright 2015 Andrey Semashev
5
6 // Distributed under the Boost Software License, Version 1.0.
7 // See http://www.boost.org/LICENSE_1_0.txt
8
9
10 #ifndef BOOST_DETAIL_WINAPI_GET_THREAD_TIMES_HPP
11 #define BOOST_DETAIL_WINAPI_GET_THREAD_TIMES_HPP
12
13 #include <boost/detail/winapi/basic_types.hpp>
14 #include <boost/detail/winapi/time.hpp>
15
16 #ifdef BOOST_HAS_PRAGMA_ONCE
17 #pragma once
18 #endif
19
20 #if !defined( BOOST_USE_WINDOWS_H )
21 extern "C" {
22 BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
23 GetThreadTimes(
24 boost::detail::winapi::HANDLE_ hThread,
25 ::_FILETIME* lpCreationTime,
26 ::_FILETIME* lpExitTime,
27 ::_FILETIME* lpKernelTime,
28 ::_FILETIME* lpUserTime);
29 }
30 #endif
31
32 namespace boost {
33 namespace detail {
34 namespace winapi {
35
36 BOOST_FORCEINLINE BOOL_ GetThreadTimes(
37 HANDLE_ hThread,
38 LPFILETIME_ lpCreationTime,
39 LPFILETIME_ lpExitTime,
40 LPFILETIME_ lpKernelTime,
41 LPFILETIME_ lpUserTime)
42 {
43 return ::GetThreadTimes(
44 hThread,
45 reinterpret_cast< ::_FILETIME* >(lpCreationTime),
46 reinterpret_cast< ::_FILETIME* >(lpExitTime),
47 reinterpret_cast< ::_FILETIME* >(lpKernelTime),
48 reinterpret_cast< ::_FILETIME* >(lpUserTime));
49 }
50
51 }
52 }
53 }
54
55 #endif // BOOST_DETAIL_WINAPI_GET_THREAD_TIMES_HPP