diff options
Diffstat (limited to 'boost/chrono/process_cpu_clocks.hpp')
-rw-r--r-- | boost/chrono/process_cpu_clocks.hpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/boost/chrono/process_cpu_clocks.hpp b/boost/chrono/process_cpu_clocks.hpp index 486950da40..248837506e 100644 --- a/boost/chrono/process_cpu_clocks.hpp +++ b/boost/chrono/process_cpu_clocks.hpp @@ -1,6 +1,7 @@ // boost/chrono/process_cpu_clocks.hpp -----------------------------------------------------------// // Copyright 2009-2011 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 @@ -43,6 +44,7 @@ namespace boost { namespace chrono { #endif }; +#if ! BOOST_OS_WINDOWS || BOOST_PLAT_WINDOWS_DESKTOP class BOOST_CHRONO_DECL process_user_cpu_clock { public: typedef nanoseconds duration; @@ -70,6 +72,7 @@ namespace boost { namespace chrono { static BOOST_CHRONO_INLINE time_point now(system::error_code & ec ); #endif }; +#endif template <typename Rep> struct process_times @@ -83,12 +86,15 @@ namespace boost { namespace chrono { : real(0) , user(0) , system(0){} + +#if ! defined BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 template <typename Rep2> explicit process_times( Rep2 r) : real(r) , user(r) , system(r){} +#endif template <typename Rep2> explicit process_times( process_times<Rep2> const& rhs) @@ -107,10 +113,12 @@ namespace boost { namespace chrono { rep user; // user cpu time rep system; // system cpu time +#if ! defined BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 operator rep() const { return real; } +#endif template <typename Rep2> bool operator==(process_times<Rep2> const& rhs) { return (real==rhs.real && @@ -180,7 +188,7 @@ namespace boost { namespace chrono { } template <class CharT, class Traits> - void read(std::basic_istream<CharT, Traits>& is) const + void read(std::basic_istream<CharT, Traits>& is) { typedef std::istreambuf_iterator<CharT, Traits> in_iterator; in_iterator i(is); @@ -292,6 +300,7 @@ namespace chrono typedef process_times<nanoseconds::rep> process_cpu_clock_times; +#if ! BOOST_OS_WINDOWS || BOOST_PLAT_WINDOWS_DESKTOP class BOOST_CHRONO_DECL process_cpu_clock { public: @@ -308,6 +317,7 @@ namespace chrono static BOOST_CHRONO_INLINE time_point now(system::error_code & ec ); #endif }; +#endif template <class CharT, class Traits, typename Rep> std::basic_ostream<CharT, Traits>& @@ -321,7 +331,7 @@ namespace chrono template <class CharT, class Traits, typename Rep> std::basic_istream<CharT, Traits>& operator>>(std::basic_istream<CharT, Traits>& is, - process_times<Rep> const& rhs) + process_times<Rep>& rhs) { rhs.read(is); return is; @@ -372,6 +382,7 @@ namespace chrono } }; +#if ! BOOST_OS_WINDOWS || BOOST_PLAT_WINDOWS_DESKTOP template<class CharT> struct clock_string<process_user_cpu_clock, CharT> { @@ -436,6 +447,7 @@ namespace chrono return str; } }; +#endif } // namespace chrono } // namespace boost |