1 // get_process_times.hpp --------------------------------------------------------------//
3 // Copyright 2010 Vicente J. Botet Escriba
5 // Distributed under the Boost Software License, Version 1.0.
6 // See http://www.boost.org/LICENSE_1_0.txt
9 #ifndef BOOST_DETAIL_WINAPI_GET_PROCESS_TIMES_HPP
10 #define BOOST_DETAIL_WINAPI_GET_PROCESS_TIMES_HPP
12 #include <boost/detail/winapi/config.hpp>
14 #ifdef BOOST_HAS_PRAGMA_ONCE
18 // Windows CE does not define GetProcessTimes
19 #if !defined( UNDER_CE )
21 #include <boost/detail/winapi/basic_types.hpp>
22 #include <boost/detail/winapi/time.hpp>
24 #if !defined( BOOST_USE_WINDOWS_H )
26 BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
28 boost::detail::winapi::HANDLE_ hProcess,
29 ::_FILETIME* lpCreationTime,
30 ::_FILETIME* lpExitTime,
31 ::_FILETIME* lpKernelTime,
32 ::_FILETIME* lpUserTime);
40 BOOST_FORCEINLINE BOOL_ GetProcessTimes(
42 LPFILETIME_ lpCreationTime,
43 LPFILETIME_ lpExitTime,
44 LPFILETIME_ lpKernelTime,
45 LPFILETIME_ lpUserTime)
47 return ::GetProcessTimes(
49 reinterpret_cast< ::_FILETIME* >(lpCreationTime),
50 reinterpret_cast< ::_FILETIME* >(lpExitTime),
51 reinterpret_cast< ::_FILETIME* >(lpKernelTime),
52 reinterpret_cast< ::_FILETIME* >(lpUserTime));
59 #endif // !defined( UNDER_CE )
60 #endif // BOOST_DETAIL_WINAPI_GET_PROCESS_TIMES_HPP