diff options
Diffstat (limited to 'boost/chrono/detail/inlined/win')
-rw-r--r-- | boost/chrono/detail/inlined/win/chrono.hpp | 1 | ||||
-rw-r--r-- | boost/chrono/detail/inlined/win/process_cpu_clocks.hpp | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/boost/chrono/detail/inlined/win/chrono.hpp b/boost/chrono/detail/inlined/win/chrono.hpp index d953fe4bb4..75160dba97 100644 --- a/boost/chrono/detail/inlined/win/chrono.hpp +++ b/boost/chrono/detail/inlined/win/chrono.hpp @@ -42,6 +42,7 @@ namespace chrono_detail (!boost::detail::win32::QueryPerformanceCounter( &pcount )) ) { BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); + return steady_clock::time_point(); } return steady_clock::time_point(steady_clock::duration( diff --git a/boost/chrono/detail/inlined/win/process_cpu_clocks.hpp b/boost/chrono/detail/inlined/win/process_cpu_clocks.hpp index 6453aa600a..1b7e67a120 100644 --- a/boost/chrono/detail/inlined/win/process_cpu_clocks.hpp +++ b/boost/chrono/detail/inlined/win/process_cpu_clocks.hpp @@ -34,8 +34,9 @@ process_real_cpu_clock::time_point process_real_cpu_clock::now() BOOST_NOEXCEPT { BOOST_ASSERT(0 && "Boost::Chrono - Internal Error"); } + typedef ratio_divide<giga, ratio<CLOCKS_PER_SEC> >::type R; return time_point( - duration(c*(1000000000l/CLOCKS_PER_SEC)) + duration(static_cast<rep>(c)*R::num/R::den) ); } @@ -56,8 +57,9 @@ process_real_cpu_clock::time_point process_real_cpu_clock::now( { ec.clear(); } + typedef ratio_divide<giga, ratio<CLOCKS_PER_SEC> >::type R; return time_point( - duration(c*(1000000000l/CLOCKS_PER_SEC)) + duration(static_cast<rep>(c)*R::num/R::den) ); } #endif |