update boost
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include <boost/winapi/time.hpp>
|
||||
#include <boost/winapi/timers.hpp>
|
||||
#include <boost/winapi/get_last_error.hpp>
|
||||
#include <boost/winapi/error_codes.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
|
||||
namespace boost
|
||||
@@ -70,7 +71,7 @@ namespace chrono_detail
|
||||
{
|
||||
boost::winapi::DWORD_ cause =
|
||||
((nanosecs_per_tic <= 0.0L)
|
||||
? ERROR_NOT_SUPPORTED
|
||||
? boost::winapi::ERROR_NOT_SUPPORTED_
|
||||
: boost::winapi::GetLastError());
|
||||
if (::boost::chrono::is_throws(ec)) {
|
||||
boost::throw_exception(
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
#include <time.h>
|
||||
#include <boost/assert.hpp>
|
||||
|
||||
#include <boost/detail/winapi/get_last_error.hpp>
|
||||
#include <boost/detail/winapi/get_current_process.hpp>
|
||||
#include <boost/winapi/get_last_error.hpp>
|
||||
#include <boost/winapi/get_current_process.hpp>
|
||||
#if BOOST_PLAT_WINDOWS_DESKTOP
|
||||
#include <boost/detail/winapi/get_process_times.hpp>
|
||||
#include <boost/winapi/get_process_times.hpp>
|
||||
#endif
|
||||
|
||||
namespace boost
|
||||
@@ -72,10 +72,10 @@ process_user_cpu_clock::time_point process_user_cpu_clock::now() BOOST_NOEXCEPT
|
||||
{
|
||||
|
||||
// note that Windows uses 100 nanosecond ticks for FILETIME
|
||||
boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time;
|
||||
boost::winapi::FILETIME_ creation, exit, user_time, system_time;
|
||||
|
||||
if ( boost::detail::winapi::GetProcessTimes(
|
||||
boost::detail::winapi::GetCurrentProcess(), &creation, &exit,
|
||||
if ( boost::winapi::GetProcessTimes(
|
||||
boost::winapi::GetCurrentProcess(), &creation, &exit,
|
||||
&system_time, &user_time ) )
|
||||
{
|
||||
return time_point(duration(
|
||||
@@ -97,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::winapi::FILETIME_ creation, exit, user_time, system_time;
|
||||
boost::winapi::FILETIME_ creation, exit, user_time, system_time;
|
||||
|
||||
if ( boost::detail::winapi::GetProcessTimes(
|
||||
boost::detail::winapi::GetCurrentProcess(), &creation, &exit,
|
||||
if ( boost::winapi::GetProcessTimes(
|
||||
boost::winapi::GetCurrentProcess(), &creation, &exit,
|
||||
&system_time, &user_time ) )
|
||||
{
|
||||
if (!::boost::chrono::is_throws(ec))
|
||||
@@ -114,7 +114,7 @@ process_user_cpu_clock::time_point process_user_cpu_clock::now(
|
||||
}
|
||||
else
|
||||
{
|
||||
boost::detail::winapi::DWORD_ cause = boost::detail::winapi::GetLastError();
|
||||
boost::winapi::DWORD_ cause = boost::winapi::GetLastError();
|
||||
if (::boost::chrono::is_throws(ec))
|
||||
{
|
||||
boost::throw_exception(
|
||||
@@ -137,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::winapi::FILETIME_ creation, exit, user_time, system_time;
|
||||
boost::winapi::FILETIME_ creation, exit, user_time, system_time;
|
||||
|
||||
if ( boost::detail::winapi::GetProcessTimes(
|
||||
boost::detail::winapi::GetCurrentProcess(), &creation, &exit,
|
||||
if ( boost::winapi::GetProcessTimes(
|
||||
boost::winapi::GetCurrentProcess(), &creation, &exit,
|
||||
&system_time, &user_time ) )
|
||||
{
|
||||
return time_point(duration(
|
||||
@@ -162,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::winapi::FILETIME_ creation, exit, user_time, system_time;
|
||||
boost::winapi::FILETIME_ creation, exit, user_time, system_time;
|
||||
|
||||
if ( boost::detail::winapi::GetProcessTimes(
|
||||
boost::detail::winapi::GetCurrentProcess(), &creation, &exit,
|
||||
if ( boost::winapi::GetProcessTimes(
|
||||
boost::winapi::GetCurrentProcess(), &creation, &exit,
|
||||
&system_time, &user_time ) )
|
||||
{
|
||||
if (!::boost::chrono::is_throws(ec))
|
||||
@@ -179,7 +179,7 @@ process_system_cpu_clock::time_point process_system_cpu_clock::now(
|
||||
}
|
||||
else
|
||||
{
|
||||
boost::detail::winapi::DWORD_ cause = boost::detail::winapi::GetLastError();
|
||||
boost::winapi::DWORD_ cause = boost::winapi::GetLastError();
|
||||
if (::boost::chrono::is_throws(ec))
|
||||
{
|
||||
boost::throw_exception(
|
||||
@@ -202,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::winapi::FILETIME_ creation, exit, user_time, system_time;
|
||||
boost::winapi::FILETIME_ creation, exit, user_time, system_time;
|
||||
|
||||
if ( boost::detail::winapi::GetProcessTimes(
|
||||
boost::detail::winapi::GetCurrentProcess(), &creation, &exit,
|
||||
if ( boost::winapi::GetProcessTimes(
|
||||
boost::winapi::GetCurrentProcess(), &creation, &exit,
|
||||
&system_time, &user_time ) )
|
||||
{
|
||||
time_point::rep r(process_real_cpu_clock::now().time_since_epoch().count()
|
||||
@@ -233,10 +233,10 @@ process_cpu_clock::time_point process_cpu_clock::now(
|
||||
{
|
||||
|
||||
// note that Windows uses 100 nanosecond ticks for FILETIME
|
||||
boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time;
|
||||
boost::winapi::FILETIME_ creation, exit, user_time, system_time;
|
||||
|
||||
if ( boost::detail::winapi::GetProcessTimes(
|
||||
boost::detail::winapi::GetCurrentProcess(), &creation, &exit,
|
||||
if ( boost::winapi::GetProcessTimes(
|
||||
boost::winapi::GetCurrentProcess(), &creation, &exit,
|
||||
&system_time, &user_time ) )
|
||||
{
|
||||
if (!::boost::chrono::is_throws(ec))
|
||||
@@ -256,7 +256,7 @@ process_cpu_clock::time_point process_cpu_clock::now(
|
||||
}
|
||||
else
|
||||
{
|
||||
boost::detail::winapi::DWORD_ cause = boost::detail::winapi::GetLastError();
|
||||
boost::winapi::DWORD_ cause = boost::winapi::GetLastError();
|
||||
if (::boost::chrono::is_throws(ec))
|
||||
{
|
||||
boost::throw_exception(
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
#include <cassert>
|
||||
#include <boost/assert.hpp>
|
||||
|
||||
#include <boost/detail/winapi/get_last_error.hpp>
|
||||
#include <boost/detail/winapi/get_current_thread.hpp>
|
||||
#include <boost/detail/winapi/get_thread_times.hpp>
|
||||
#include <boost/winapi/get_last_error.hpp>
|
||||
#include <boost/winapi/get_current_thread.hpp>
|
||||
#include <boost/winapi/get_thread_times.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
@@ -29,10 +29,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::winapi::FILETIME_ creation, exit, user_time, system_time;
|
||||
boost::winapi::FILETIME_ creation, exit, user_time, system_time;
|
||||
|
||||
if ( boost::detail::winapi::GetThreadTimes(
|
||||
boost::detail::winapi::GetCurrentThread (), &creation, &exit,
|
||||
if ( boost::winapi::GetThreadTimes(
|
||||
boost::winapi::GetCurrentThread (), &creation, &exit,
|
||||
&system_time, &user_time ) )
|
||||
{
|
||||
duration user = duration(
|
||||
@@ -56,13 +56,13 @@ thread_clock::time_point thread_clock::now( system::error_code & ec )
|
||||
{
|
||||
boost::throw_exception(
|
||||
system::system_error(
|
||||
boost::detail::winapi::GetLastError(),
|
||||
boost::winapi::GetLastError(),
|
||||
::boost::system::system_category(),
|
||||
"chrono::thread_clock" ));
|
||||
}
|
||||
else
|
||||
{
|
||||
ec.assign( boost::detail::winapi::GetLastError(), ::boost::system::system_category() );
|
||||
ec.assign( boost::winapi::GetLastError(), ::boost::system::system_category() );
|
||||
return thread_clock::time_point(duration(0));
|
||||
}
|
||||
}
|
||||
@@ -73,10 +73,10 @@ thread_clock::time_point thread_clock::now() BOOST_NOEXCEPT
|
||||
{
|
||||
|
||||
// note that Windows uses 100 nanosecond ticks for FILETIME
|
||||
boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time;
|
||||
boost::winapi::FILETIME_ creation, exit, user_time, system_time;
|
||||
|
||||
if ( boost::detail::winapi::GetThreadTimes(
|
||||
boost::detail::winapi::GetCurrentThread (), &creation, &exit,
|
||||
if ( boost::winapi::GetThreadTimes(
|
||||
boost::winapi::GetCurrentThread (), &creation, &exit,
|
||||
&system_time, &user_time ) )
|
||||
{
|
||||
duration user = duration(
|
||||
|
||||
Reference in New Issue
Block a user