1 // get_thread_times.hpp --------------------------------------------------------------//
3 // Copyright 2010 Vicente J. Botet Escriba
4 // Copyright 2015 Andrey Semashev
6 // Distributed under the Boost Software License, Version 1.0.
7 // See http://www.boost.org/LICENSE_1_0.txt
10 #ifndef BOOST_DETAIL_WINAPI_GET_THREAD_TIMES_HPP
11 #define BOOST_DETAIL_WINAPI_GET_THREAD_TIMES_HPP
13 #include <boost/detail/winapi/basic_types.hpp>
14 #include <boost/detail/winapi/time.hpp>
16 #ifdef BOOST_HAS_PRAGMA_ONCE
20 #if !defined( BOOST_USE_WINDOWS_H )
22 BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
24 boost::detail::winapi::HANDLE_ hThread,
25 ::_FILETIME* lpCreationTime,
26 ::_FILETIME* lpExitTime,
27 ::_FILETIME* lpKernelTime,
28 ::_FILETIME* lpUserTime);
36 BOOST_FORCEINLINE BOOL_ GetThreadTimes(
38 LPFILETIME_ lpCreationTime,
39 LPFILETIME_ lpExitTime,
40 LPFILETIME_ lpKernelTime,
41 LPFILETIME_ lpUserTime)
43 return ::GetThreadTimes(
45 reinterpret_cast< ::_FILETIME* >(lpCreationTime),
46 reinterpret_cast< ::_FILETIME* >(lpExitTime),
47 reinterpret_cast< ::_FILETIME* >(lpKernelTime),
48 reinterpret_cast< ::_FILETIME* >(lpUserTime));
55 #endif // BOOST_DETAIL_WINAPI_GET_THREAD_TIMES_HPP