diff options
Diffstat (limited to 'boost/chrono/detail/inlined')
-rw-r--r-- | boost/chrono/detail/inlined/mac/process_cpu_clocks.hpp | 43 | ||||
-rw-r--r-- | boost/chrono/detail/inlined/mac/thread_clock.hpp | 80 | ||||
-rw-r--r-- | boost/chrono/detail/inlined/posix/process_cpu_clocks.hpp | 17 | ||||
-rw-r--r-- | boost/chrono/detail/inlined/posix/thread_clock.hpp | 2 | ||||
-rw-r--r-- | boost/chrono/detail/inlined/win/chrono.hpp | 91 | ||||
-rw-r--r-- | boost/chrono/detail/inlined/win/process_cpu_clocks.hpp | 53 | ||||
-rw-r--r-- | boost/chrono/detail/inlined/win/thread_clock.hpp | 22 |
7 files changed, 203 insertions, 105 deletions
diff --git a/boost/chrono/detail/inlined/mac/process_cpu_clocks.hpp b/boost/chrono/detail/inlined/mac/process_cpu_clocks.hpp index 48753bdfc7..6d09e2cb3a 100644 --- a/boost/chrono/detail/inlined/mac/process_cpu_clocks.hpp +++ b/boost/chrono/detail/inlined/mac/process_cpu_clocks.hpp @@ -48,7 +48,7 @@ namespace boost process_real_cpu_clock::time_point process_real_cpu_clock::now() BOOST_NOEXCEPT { -#if 0 +#if 1 tms tm; clock_t c = ::times(&tm); if (c == clock_t(-1)) // error @@ -71,10 +71,18 @@ namespace boost if (c == clock_t(-1)) // error { BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); + } else + { + long factor = chrono_detail::tick_factor(); + if (factor != -1) + { + return time_point(nanoseconds(c * factor)); + } else + { + BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); + } } - return time_point( - duration(c*(1000000000l/CLOCKS_PER_SEC)) - ); + return time_point(); #endif } @@ -82,7 +90,7 @@ namespace boost process_real_cpu_clock::time_point process_real_cpu_clock::now(system::error_code & ec) { -#if 0 +#if 1 tms tm; clock_t c = ::times(&tm); if (c == clock_t(-1)) // error @@ -129,11 +137,28 @@ namespace boost ec.assign(errno, BOOST_CHRONO_SYSTEM_CATEGORY); return time_point(); } + } else + { + long factor = chrono_detail::tick_factor(); + if (factor != -1) + { + if (!BOOST_CHRONO_IS_THROWS(ec)) + { + ec.clear(); + } + return time_point(nanoseconds(c * factor)); + } else + { + if (BOOST_CHRONO_IS_THROWS(ec)) + { + boost::throw_exception(system::system_error(errno, BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::process_real_cpu_clock")); + } else + { + ec.assign(errno, BOOST_CHRONO_SYSTEM_CATEGORY); + return time_point(); + } + } } - return time_point( - duration(c*(1000000000l/CLOCKS_PER_SEC)) - ); - #endif } diff --git a/boost/chrono/detail/inlined/mac/thread_clock.hpp b/boost/chrono/detail/inlined/mac/thread_clock.hpp index dad806e4e2..1a4406b83d 100644 --- a/boost/chrono/detail/inlined/mac/thread_clock.hpp +++ b/boost/chrono/detail/inlined/mac/thread_clock.hpp @@ -1,6 +1,8 @@ // boost thread_clock.cpp -----------------------------------------------------------// -// Copyright Vicente J. Botet Escriba 2010 +// Copyright Beman Dawes 1994, 2006, 2008 +// Copyright Vicente J. Botet Escriba 2009-2011 +// Copyright Christopher Brown 2013 // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt @@ -10,6 +12,80 @@ //--------------------------------------------------------------------------------------// #include <boost/chrono/config.hpp> -#include <boost/chrono/detail/inlined/posix/thread_clock.hpp> +#include <boost/chrono/thread_clock.hpp> #include <cassert> +# include <pthread.h> +# include <mach/thread_act.h> + +namespace boost { namespace chrono { + + thread_clock::time_point thread_clock::now( ) BOOST_NOEXCEPT + { + // get the thread port (borrowing pthread's reference) + mach_port_t port = pthread_mach_thread_np(pthread_self()); + + // get the thread info + thread_basic_info_data_t info; + mach_msg_type_number_t count = THREAD_BASIC_INFO_COUNT; + if ( thread_info(port, THREAD_BASIC_INFO, (thread_info_t)&info, &count) != KERN_SUCCESS ) + { + BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); + return time_point(); + } + + // convert to nanoseconds + duration user = duration( + static_cast<thread_clock::rep>( info.user_time.seconds ) * 1000000000 + + static_cast<thread_clock::rep>(info.user_time.microseconds ) * 1000); + + duration system = duration( + static_cast<thread_clock::rep>( info.system_time.seconds ) * 1000000000 + + static_cast<thread_clock::rep>( info.system_time.microseconds ) * 1000); + + return time_point( user + system ); + } + +#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING + thread_clock::time_point thread_clock::now( system::error_code & ec ) + { + // get the thread port (borrowing pthread's reference) + mach_port_t port = pthread_mach_thread_np(pthread_self()); + + // get the thread info + thread_basic_info_data_t info; + mach_msg_type_number_t count = THREAD_BASIC_INFO_COUNT; + if ( thread_info(port, THREAD_BASIC_INFO, (thread_info_t)&info, &count) != KERN_SUCCESS ) + { + if (BOOST_CHRONO_IS_THROWS(ec)) + { + boost::throw_exception( + system::system_error( + EINVAL, + BOOST_CHRONO_SYSTEM_CATEGORY, + "chrono::thread_clock" )); + } + else + { + ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY ); + return time_point(); + } + } + if (!BOOST_CHRONO_IS_THROWS(ec)) + { + ec.clear(); + } + + // convert to nanoseconds + duration user = duration( + static_cast<thread_clock::rep>( info.user_time.seconds ) * 1000000000 + + static_cast<thread_clock::rep>(info.user_time.microseconds ) * 1000); + + duration system = duration( + static_cast<thread_clock::rep>( info.system_time.seconds ) * 1000000000 + + static_cast<thread_clock::rep>( info.system_time.microseconds ) * 1000); + + return time_point( user + system ); + } +#endif +} } diff --git a/boost/chrono/detail/inlined/posix/process_cpu_clocks.hpp b/boost/chrono/detail/inlined/posix/process_cpu_clocks.hpp index 5d5c4f4806..0476f590c9 100644 --- a/boost/chrono/detail/inlined/posix/process_cpu_clocks.hpp +++ b/boost/chrono/detail/inlined/posix/process_cpu_clocks.hpp @@ -22,7 +22,7 @@ namespace boost { namespace chrono { namespace chrono_detail { - inline long tick_factor() // multiplier to convert ticks + inline nanoseconds::rep tick_factor() // multiplier to convert ticks // to nanoseconds; -1 if unknown { static long factor = 0; @@ -281,12 +281,13 @@ process_cpu_clock::time_point process_cpu_clock::now() BOOST_NOEXCEPT } else { - if ( chrono_detail::tick_factor() != -1 ) + nanoseconds::rep factor = chrono_detail::tick_factor(); + if ( factor != -1 ) { time_point::rep r( - 1000*c*chrono_detail::tick_factor(), - 1000*(tm.tms_utime + tm.tms_cutime)*chrono_detail::tick_factor(), - 1000*(tm.tms_stime + tm.tms_cstime)*chrono_detail::tick_factor()); + c*factor, + (tm.tms_utime + tm.tms_cutime)*factor, + (tm.tms_stime + tm.tms_cstime)*factor); return time_point(duration(r)); } else @@ -324,9 +325,9 @@ process_cpu_clock::time_point process_cpu_clock::now( if ( chrono_detail::tick_factor() != -1 ) { time_point::rep r( - 1000*c*chrono_detail::tick_factor(), - 1000*(tm.tms_utime + tm.tms_cutime)*chrono_detail::tick_factor(), - 1000*(tm.tms_stime + tm.tms_cstime)*chrono_detail::tick_factor()); + c*chrono_detail::tick_factor(), + (tm.tms_utime + tm.tms_cutime)*chrono_detail::tick_factor(), + (tm.tms_stime + tm.tms_cstime)*chrono_detail::tick_factor()); return time_point(duration(r)); } else diff --git a/boost/chrono/detail/inlined/posix/thread_clock.hpp b/boost/chrono/detail/inlined/posix/thread_clock.hpp index 42a544a0d6..a1012240ec 100644 --- a/boost/chrono/detail/inlined/posix/thread_clock.hpp +++ b/boost/chrono/detail/inlined/posix/thread_clock.hpp @@ -14,7 +14,9 @@ #include <boost/chrono/thread_clock.hpp> #include <cassert> +#if !defined(__VXWORKS__) # include <sys/times.h> +#endif # include <pthread.h> # include <unistd.h> diff --git a/boost/chrono/detail/inlined/win/chrono.hpp b/boost/chrono/detail/inlined/win/chrono.hpp index 75160dba97..16e8c51426 100644 --- a/boost/chrono/detail/inlined/win/chrono.hpp +++ b/boost/chrono/detail/inlined/win/chrono.hpp @@ -12,9 +12,9 @@ #ifndef BOOST_CHRONO_DETAIL_INLINED_WIN_CHRONO_HPP #define BOOST_CHRONO_DETAIL_INLINED_WIN_CHRONO_HPP -#include <boost/detail/win/time.hpp> -#include <boost/detail/win/timers.hpp> -#include <boost/detail/win/GetLastError.hpp> +#include <boost/detail/winapi/time.hpp> +#include <boost/detail/winapi/timers.hpp> +#include <boost/detail/winapi/GetLastError.hpp> namespace boost { @@ -25,8 +25,8 @@ namespace chrono_detail BOOST_CHRONO_INLINE double get_nanosecs_per_tic() BOOST_NOEXCEPT { - boost::detail::win32::LARGE_INTEGER_ freq; - if ( !boost::detail::win32::QueryPerformanceFrequency( &freq ) ) + boost::detail::winapi::LARGE_INTEGER_ freq; + if ( !boost::detail::winapi::QueryPerformanceFrequency( &freq ) ) return 0.0L; return double(1000000000.0L / freq.QuadPart); } @@ -35,15 +35,23 @@ namespace chrono_detail steady_clock::time_point steady_clock::now() BOOST_NOEXCEPT { - static double nanosecs_per_tic = chrono_detail::get_nanosecs_per_tic(); + double nanosecs_per_tic = chrono_detail::get_nanosecs_per_tic(); - boost::detail::win32::LARGE_INTEGER_ pcount; - if ( (nanosecs_per_tic <= 0.0L) || - (!boost::detail::win32::QueryPerformanceCounter( &pcount )) ) + boost::detail::winapi::LARGE_INTEGER_ pcount; + if ( nanosecs_per_tic <= 0.0L ) { - BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); + BOOST_ASSERT(0 && "Boost::Chrono - get_nanosecs_per_tic Internal Error"); return steady_clock::time_point(); } + unsigned times=0; + while ( ! boost::detail::winapi::QueryPerformanceCounter( &pcount ) ) + { + if ( ++times > 3 ) + { + BOOST_ASSERT(0 && "Boost::Chrono - QueryPerformanceCounter Internal Error"); + return steady_clock::time_point(); + } + } return steady_clock::time_point(steady_clock::duration( static_cast<steady_clock::rep>((nanosecs_per_tic) * pcount.QuadPart))); @@ -53,16 +61,16 @@ namespace chrono_detail #if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING steady_clock::time_point steady_clock::now( system::error_code & ec ) { - static double nanosecs_per_tic = chrono_detail::get_nanosecs_per_tic(); + double nanosecs_per_tic = chrono_detail::get_nanosecs_per_tic(); - boost::detail::win32::LARGE_INTEGER_ pcount; + boost::detail::winapi::LARGE_INTEGER_ pcount; if ( (nanosecs_per_tic <= 0.0L) - || (!boost::detail::win32::QueryPerformanceCounter( &pcount )) ) + || (!boost::detail::winapi::QueryPerformanceCounter( &pcount )) ) { - boost::detail::win32::DWORD_ cause = + boost::detail::winapi::DWORD_ cause = ((nanosecs_per_tic <= 0.0L) ? ERROR_NOT_SUPPORTED - : boost::detail::win32::GetLastError()); + : boost::detail::winapi::GetLastError()); if (BOOST_CHRONO_IS_THROWS(ec)) { boost::throw_exception( system::system_error( @@ -89,38 +97,33 @@ namespace chrono_detail BOOST_CHRONO_INLINE system_clock::time_point system_clock::now() BOOST_NOEXCEPT { - boost::detail::win32::FILETIME_ ft; - #if defined(UNDER_CE) - // Windows CE does not define GetSystemTimeAsFileTime so we do it in two steps. - boost::detail::win32::SYSTEMTIME_ st; - boost::detail::win32::GetSystemTime( &st ); - boost::detail::win32::SystemTimeToFileTime( &st, &ft ); - #else - boost::detail::win32::GetSystemTimeAsFileTime( &ft ); // never fails - #endif - return system_clock::time_point(system_clock::duration( - (static_cast<__int64>( ft.dwHighDateTime ) << 32) | ft.dwLowDateTime)); + boost::detail::winapi::FILETIME_ ft; + boost::detail::winapi::GetSystemTimeAsFileTime( &ft ); // never fails + return system_clock::time_point( + system_clock::duration( + ((static_cast<__int64>( ft.dwHighDateTime ) << 32) | ft.dwLowDateTime) + - 116444736000000000LL + //- (134775LL*864000000000LL) + ) + ); } #if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING BOOST_CHRONO_INLINE system_clock::time_point system_clock::now( system::error_code & ec ) { - boost::detail::win32::FILETIME_ ft; - #if defined(UNDER_CE) - // Windows CE does not define GetSystemTimeAsFileTime so we do it in two steps. - boost::detail::win32::SYSTEMTIME_ st; - boost::detail::win32::GetSystemTime( &st ); - boost::detail::win32::SystemTimeToFileTime( &st, &ft ); - #else - boost::detail::win32::GetSystemTimeAsFileTime( &ft ); // never fails - #endif + boost::detail::winapi::FILETIME_ ft; + boost::detail::winapi::GetSystemTimeAsFileTime( &ft ); // never fails if (!BOOST_CHRONO_IS_THROWS(ec)) { ec.clear(); } - return time_point(duration( - (static_cast<__int64>( ft.dwHighDateTime ) << 32) | ft.dwLowDateTime)); + return system_clock::time_point( + system_clock::duration( + ((static_cast<__int64>( ft.dwHighDateTime ) << 32) | ft.dwLowDateTime) + - 116444736000000000LL + //- (134775LL*864000000000LL) + )); } #endif @@ -128,13 +131,6 @@ namespace chrono_detail std::time_t system_clock::to_time_t(const system_clock::time_point& t) BOOST_NOEXCEPT { __int64 temp = t.time_since_epoch().count(); - - # if (!defined( BOOST_MSVC )) || (BOOST_MSVC > 1300) // > VC++ 7.0 - temp -= 116444736000000000LL; // delta from epoch in microseconds - # else - temp -= 116444736000000000; - # endif - temp /= 10000000; return static_cast<std::time_t>( temp ); } @@ -144,13 +140,6 @@ namespace chrono_detail { __int64 temp = t; temp *= 10000000; - - # if (!defined( BOOST_MSVC )) || (BOOST_MSVC > 1300) // > VC++ 7.0 - temp += 116444736000000000LL; - # else - temp += 116444736000000000; - # endif - return time_point(duration(temp)); } diff --git a/boost/chrono/detail/inlined/win/process_cpu_clocks.hpp b/boost/chrono/detail/inlined/win/process_cpu_clocks.hpp index 1b7e67a120..e97bfe590c 100644 --- a/boost/chrono/detail/inlined/win/process_cpu_clocks.hpp +++ b/boost/chrono/detail/inlined/win/process_cpu_clocks.hpp @@ -2,6 +2,7 @@ // Copyright Beman Dawes 1994, 2006, 2008 // Copyright 2009-2010 Vicente J. Botet Escriba +// Copyright (c) Microsoft Corporation 2014 // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt @@ -18,9 +19,11 @@ #include <cassert> #include <time.h> -#include <boost/detail/win/GetLastError.hpp> -#include <boost/detail/win/GetCurrentProcess.hpp> -#include <boost/detail/win/GetProcessTimes.hpp> +#include <boost/detail/winapi/GetLastError.hpp> +#include <boost/detail/winapi/GetCurrentProcess.hpp> +#if BOOST_PLAT_WINDOWS_DESKTOP +#include <boost/detail/winapi/GetProcessTimes.hpp> +#endif namespace boost { @@ -64,14 +67,15 @@ process_real_cpu_clock::time_point process_real_cpu_clock::now( } #endif +#if BOOST_PLAT_WINDOWS_DESKTOP process_user_cpu_clock::time_point process_user_cpu_clock::now() BOOST_NOEXCEPT { // note that Windows uses 100 nanosecond ticks for FILETIME - boost::detail::win32::FILETIME_ creation, exit, user_time, system_time; + boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time; - if ( boost::detail::win32::GetProcessTimes( - boost::detail::win32::GetCurrentProcess(), &creation, &exit, + if ( boost::detail::winapi::GetProcessTimes( + boost::detail::winapi::GetCurrentProcess(), &creation, &exit, &system_time, &user_time ) ) { return time_point(duration( @@ -93,10 +97,10 @@ process_user_cpu_clock::time_point process_user_cpu_clock::now( { // note that Windows uses 100 nanosecond ticks for FILETIME - boost::detail::win32::FILETIME_ creation, exit, user_time, system_time; + boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time; - if ( boost::detail::win32::GetProcessTimes( - boost::detail::win32::GetCurrentProcess(), &creation, &exit, + if ( boost::detail::winapi::GetProcessTimes( + boost::detail::winapi::GetCurrentProcess(), &creation, &exit, &system_time, &user_time ) ) { if (!BOOST_CHRONO_IS_THROWS(ec)) @@ -110,7 +114,7 @@ process_user_cpu_clock::time_point process_user_cpu_clock::now( } else { - boost::detail::win32::DWORD_ cause = boost::detail::win32::GetLastError(); + boost::detail::winapi::DWORD_ cause = boost::detail::winapi::GetLastError(); if (BOOST_CHRONO_IS_THROWS(ec)) { boost::throw_exception( @@ -133,10 +137,10 @@ process_system_cpu_clock::time_point process_system_cpu_clock::now() BOOST_NOEXC { // note that Windows uses 100 nanosecond ticks for FILETIME - boost::detail::win32::FILETIME_ creation, exit, user_time, system_time; + boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time; - if ( boost::detail::win32::GetProcessTimes( - boost::detail::win32::GetCurrentProcess(), &creation, &exit, + if ( boost::detail::winapi::GetProcessTimes( + boost::detail::winapi::GetCurrentProcess(), &creation, &exit, &system_time, &user_time ) ) { return time_point(duration( @@ -158,10 +162,10 @@ process_system_cpu_clock::time_point process_system_cpu_clock::now( { // note that Windows uses 100 nanosecond ticks for FILETIME - boost::detail::win32::FILETIME_ creation, exit, user_time, system_time; + boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time; - if ( boost::detail::win32::GetProcessTimes( - boost::detail::win32::GetCurrentProcess(), &creation, &exit, + if ( boost::detail::winapi::GetProcessTimes( + boost::detail::winapi::GetCurrentProcess(), &creation, &exit, &system_time, &user_time ) ) { if (!BOOST_CHRONO_IS_THROWS(ec)) @@ -175,7 +179,7 @@ process_system_cpu_clock::time_point process_system_cpu_clock::now( } else { - boost::detail::win32::DWORD_ cause = boost::detail::win32::GetLastError(); + boost::detail::winapi::DWORD_ cause = boost::detail::winapi::GetLastError(); if (BOOST_CHRONO_IS_THROWS(ec)) { boost::throw_exception( @@ -198,10 +202,10 @@ process_cpu_clock::time_point process_cpu_clock::now() BOOST_NOEXCEPT { // note that Windows uses 100 nanosecond ticks for FILETIME - boost::detail::win32::FILETIME_ creation, exit, user_time, system_time; + boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time; - if ( boost::detail::win32::GetProcessTimes( - boost::detail::win32::GetCurrentProcess(), &creation, &exit, + if ( boost::detail::winapi::GetProcessTimes( + boost::detail::winapi::GetCurrentProcess(), &creation, &exit, &system_time, &user_time ) ) { time_point::rep r(process_real_cpu_clock::now().time_since_epoch().count() @@ -229,10 +233,10 @@ process_cpu_clock::time_point process_cpu_clock::now( { // note that Windows uses 100 nanosecond ticks for FILETIME - boost::detail::win32::FILETIME_ creation, exit, user_time, system_time; + boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time; - if ( boost::detail::win32::GetProcessTimes( - boost::detail::win32::GetCurrentProcess(), &creation, &exit, + if ( boost::detail::winapi::GetProcessTimes( + boost::detail::winapi::GetCurrentProcess(), &creation, &exit, &system_time, &user_time ) ) { if (!BOOST_CHRONO_IS_THROWS(ec)) @@ -252,7 +256,7 @@ process_cpu_clock::time_point process_cpu_clock::now( } else { - boost::detail::win32::DWORD_ cause = boost::detail::win32::GetLastError(); + boost::detail::winapi::DWORD_ cause = boost::detail::winapi::GetLastError(); if (BOOST_CHRONO_IS_THROWS(ec)) { boost::throw_exception( @@ -270,6 +274,7 @@ process_cpu_clock::time_point process_cpu_clock::now( } #endif +#endif } // namespace chrono } // namespace boost diff --git a/boost/chrono/detail/inlined/win/thread_clock.hpp b/boost/chrono/detail/inlined/win/thread_clock.hpp index 8ca1506ce5..e47c481473 100644 --- a/boost/chrono/detail/inlined/win/thread_clock.hpp +++ b/boost/chrono/detail/inlined/win/thread_clock.hpp @@ -15,9 +15,9 @@ #include <boost/chrono/thread_clock.hpp> #include <cassert> -#include <boost/detail/win/GetLastError.hpp> -#include <boost/detail/win/GetCurrentThread.hpp> -#include <boost/detail/win/GetThreadTimes.hpp> +#include <boost/detail/winapi/GetLastError.hpp> +#include <boost/detail/winapi/GetCurrentThread.hpp> +#include <boost/detail/winapi/GetThreadTimes.hpp> namespace boost { @@ -28,10 +28,10 @@ namespace chrono thread_clock::time_point thread_clock::now( system::error_code & ec ) { // note that Windows uses 100 nanosecond ticks for FILETIME - boost::detail::win32::FILETIME_ creation, exit, user_time, system_time; + boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time; - if ( boost::detail::win32::GetThreadTimes( - boost::detail::win32::GetCurrentThread (), &creation, &exit, + if ( boost::detail::winapi::GetThreadTimes( + boost::detail::winapi::GetCurrentThread (), &creation, &exit, &system_time, &user_time ) ) { duration user = duration( @@ -55,13 +55,13 @@ thread_clock::time_point thread_clock::now( system::error_code & ec ) { boost::throw_exception( system::system_error( - boost::detail::win32::GetLastError(), + boost::detail::winapi::GetLastError(), BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::thread_clock" )); } else { - ec.assign( boost::detail::win32::GetLastError(), BOOST_CHRONO_SYSTEM_CATEGORY ); + ec.assign( boost::detail::winapi::GetLastError(), BOOST_CHRONO_SYSTEM_CATEGORY ); return thread_clock::time_point(duration(0)); } } @@ -72,10 +72,10 @@ thread_clock::time_point thread_clock::now() BOOST_NOEXCEPT { // note that Windows uses 100 nanosecond ticks for FILETIME - boost::detail::win32::FILETIME_ creation, exit, user_time, system_time; + boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time; - if ( boost::detail::win32::GetThreadTimes( - boost::detail::win32::GetCurrentThread (), &creation, &exit, + if ( boost::detail::winapi::GetThreadTimes( + boost::detail::winapi::GetCurrentThread (), &creation, &exit, &system_time, &user_time ) ) { duration user = duration( |