Index: boost/chrono/chrono.hpp =================================================================== --- boost/chrono/chrono.hpp (revision 52554) +++ boost/chrono/chrono.hpp (working copy) @@ -201,7 +201,11 @@ // Clocks class BOOST_CHRONO_DECL system_clock; +#ifdef BOOST_HAS_CLOCK_MONOTONIC class BOOST_CHRONO_DECL monotonic_clock; +#else + typedef system_clock monotonic_clock; +#endif typedef monotonic_clock high_resolution_clock; // as permitted by [time.clock.hires] //----------------------------------------------------------------------------// @@ -918,7 +922,7 @@ //----------------------------------------------------------------------------// // 20.9.5.2 Class monotonic_clock [time.clock.monotonic] // //----------------------------------------------------------------------------// - +#ifdef BOOST_HAS_CLOCK_MONOTONIC class BOOST_CHRONO_DECL monotonic_clock { public: @@ -931,7 +935,7 @@ static time_point now(); // throws on error static time_point now(system::error_code & ec); // never throws }; - +#endif //----------------------------------------------------------------------------// // 20.9.5.3 Class high_resolution_clock [time.clock.hires] // //----------------------------------------------------------------------------// Index: libs/chrono/src/chrono.cpp =================================================================== --- libs/chrono/src/chrono.cpp (revision 52554) +++ libs/chrono/src/chrono.cpp (working copy) @@ -256,7 +256,6 @@ // return time_point(duration( // (static_cast( tod.tv_sec ) * 1000000) + tod.tv_usec)); //} - #ifndef CLOCK_REALTIME # error does not supply CLOCK_REALTIME #endif @@ -298,6 +297,7 @@ return time_point(duration(static_cast(t) * 1000000000)); } +#ifdef BOOST_HAS_CLOCK_MONOTONIC #ifndef CLOCK_MONOTONIC # error does not supply CLOCK_MONOTONIC #endif @@ -328,6 +328,7 @@ return time_point(duration( static_cast( ts.tv_sec ) * 1000000000 + ts.tv_nsec)); } +#endif } // namespace chrono } // namespace boost Index: libs/chrono/test/run_timer_test.cpp =================================================================== --- libs/chrono/test/run_timer_test.cpp (revision 52554) +++ libs/chrono/test/run_timer_test.cpp (working copy) @@ -1,4 +1,4 @@ -// boost run_timer_test.cpp -----------------------------------------------------// + // boost run_timer_test.cpp -----------------------------------------------------// // Copyright Beman Dawes 2006, 2008