|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r67763 - in trunk/boost/chrono: . detail/inlined/posix detail/inlined/win typeof/boost/chrono
From: vicente.botet_at_[hidden]
Date: 2011-01-07 16:33:48
Author: viboes
Date: 2011-01-07 16:33:39 EST (Fri, 07 Jan 2011)
New Revision: 67763
URL: http://svn.boost.org/trac/boost/changeset/67763
Log:
Boost.Chrono: change monotonic by steady
Text files modified:
trunk/boost/chrono/chrono_io.hpp | 4 ++--
trunk/boost/chrono/config.hpp | 12 ++++++------
trunk/boost/chrono/detail/inlined/posix/chrono.hpp | 14 +++++++-------
trunk/boost/chrono/detail/inlined/posix/thread_clock.hpp | 2 +-
trunk/boost/chrono/detail/inlined/win/chrono.hpp | 16 ++++++++--------
trunk/boost/chrono/detail/inlined/win/process_clock.hpp | 2 +-
trunk/boost/chrono/detail/inlined/win/process_cpu_clocks.hpp | 4 ++--
trunk/boost/chrono/process_cpu_clocks.hpp | 8 ++++----
trunk/boost/chrono/process_times.hpp | 2 +-
trunk/boost/chrono/system_clocks.hpp | 26 +++++++++++++-------------
trunk/boost/chrono/thread_clock.hpp | 2 +-
trunk/boost/chrono/timer.hpp | 4 ++--
trunk/boost/chrono/typeof/boost/chrono/chrono.hpp | 4 ++--
13 files changed, 50 insertions(+), 50 deletions(-)
Modified: trunk/boost/chrono/chrono_io.hpp
==============================================================================
--- trunk/boost/chrono/chrono_io.hpp (original)
+++ trunk/boost/chrono/chrono_io.hpp 2011-01-07 16:33:39 EST (Fri, 07 Jan 2011)
@@ -496,10 +496,10 @@
return str;
}
};
-#ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
+#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
template <class CharT>
-struct clock_string<monotonic_clock, CharT>
+struct clock_string<steady_clock, CharT>
{
static std::basic_string<CharT> name()
{
Modified: trunk/boost/chrono/config.hpp
==============================================================================
--- trunk/boost/chrono/config.hpp (original)
+++ trunk/boost/chrono/config.hpp 2011-01-07 16:33:39 EST (Fri, 07 Jan 2011)
@@ -33,13 +33,13 @@
# elif !defined( BOOST_CHRONO_WINDOWS_API ) && !defined( BOOST_CHRONO_MAC_API ) && !defined( BOOST_CHRONO_POSIX_API )
# if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32))
# define BOOST_CHRONO_WINDOWS_API
-# define BOOST_CHRONO_HAS_CLOCK_MONOTONIC
+# define BOOST_CHRONO_HAS_CLOCK_STEADY
# define BOOST_CHRONO_HAS_THREAD_CLOCK
-# define BOOST_CHRONO_THREAD_CLOCK_IS_MONOTONIC true
+# define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true
# elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
# define BOOST_CHRONO_MAC_API
-# define BOOST_CHRONO_HAS_CLOCK_MONOTONIC
-# define BOOST_CHRONO_THREAD_CLOCK_IS_MONOTONIC true
+# define BOOST_CHRONO_HAS_CLOCK_STEADY
+# define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true
# else
# define BOOST_CHRONO_POSIX_API
# endif
@@ -49,14 +49,14 @@
# include <time.h> //to check for CLOCK_REALTIME and CLOCK_MONOTONIC and _POSIX_THREAD_CPUTIME
# if defined(CLOCK_REALTIME)
# if defined(CLOCK_MONOTONIC)
-# define BOOST_CHRONO_HAS_CLOCK_MONOTONIC
+# define BOOST_CHRONO_HAS_CLOCK_STEADY
# endif
# else
# error <time.h> does not supply CLOCK_REALTIME
# endif
# if defined(_POSIX_THREAD_CPUTIME)
# define BOOST_CHRONO_HAS_THREAD_CLOCK
-# define BOOST_CHRONO_THREAD_CLOCK_IS_MONOTONIC true
+# define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true
# endif
# endif
Modified: trunk/boost/chrono/detail/inlined/posix/chrono.hpp
==============================================================================
--- trunk/boost/chrono/detail/inlined/posix/chrono.hpp (original)
+++ trunk/boost/chrono/detail/inlined/posix/chrono.hpp 2011-01-07 16:33:39 EST (Fri, 07 Jan 2011)
@@ -71,9 +71,9 @@
return time_point(duration(static_cast<system_clock::rep>(t) * 1000000000));
}
-#ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
+#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
- monotonic_clock::time_point monotonic_clock::now()
+ steady_clock::time_point steady_clock::now()
{
timespec ts;
if ( ::clock_gettime( CLOCK_MONOTONIC, &ts ) )
@@ -82,14 +82,14 @@
system::system_error(
errno,
BOOST_CHRONO_SYSTEM_CATEGORY,
- "chrono::monotonic_clock" ));
+ "chrono::steady_clock" ));
}
return time_point(duration(
- static_cast<monotonic_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
+ static_cast<steady_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
}
- monotonic_clock::time_point monotonic_clock::now(system::error_code & ec)
+ steady_clock::time_point steady_clock::now(system::error_code & ec)
{
timespec ts;
if ( ::clock_gettime( CLOCK_MONOTONIC, &ts ) )
@@ -100,7 +100,7 @@
system::system_error(
errno,
BOOST_CHRONO_SYSTEM_CATEGORY,
- "chrono::monotonic_clock" ));
+ "chrono::steady_clock" ));
}
else
{
@@ -114,7 +114,7 @@
ec.clear();
}
return time_point(duration(
- static_cast<monotonic_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
+ static_cast<steady_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
}
#endif
Modified: trunk/boost/chrono/detail/inlined/posix/thread_clock.hpp
==============================================================================
--- trunk/boost/chrono/detail/inlined/posix/thread_clock.hpp (original)
+++ trunk/boost/chrono/detail/inlined/posix/thread_clock.hpp 2011-01-07 16:33:39 EST (Fri, 07 Jan 2011)
@@ -1,7 +1,7 @@
// boost thread_clock.cpp -----------------------------------------------------------//
// Copyright Beman Dawes 1994, 2006, 2008
-// Copyright Vicente J. Botet Escriba 2009
+// Copyright Vicente J. Botet Escriba 2009-2011
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
Modified: trunk/boost/chrono/detail/inlined/win/chrono.hpp
==============================================================================
--- trunk/boost/chrono/detail/inlined/win/chrono.hpp (original)
+++ trunk/boost/chrono/detail/inlined/win/chrono.hpp 2011-01-07 16:33:39 EST (Fri, 07 Jan 2011)
@@ -33,7 +33,7 @@
}
- monotonic_clock::time_point monotonic_clock::now()
+ steady_clock::time_point steady_clock::now()
{
static double nanosecs_per_tic = chrono_detail::get_nanosecs_per_tic();
@@ -49,15 +49,15 @@
system::system_error(
cause,
BOOST_CHRONO_SYSTEM_CATEGORY,
- "chrono::monotonic_clock" ));
+ "chrono::steady_clock" ));
}
- return monotonic_clock::time_point(monotonic_clock::duration(
- static_cast<monotonic_clock::rep>((nanosecs_per_tic) * pcount.QuadPart)));
+ return steady_clock::time_point(steady_clock::duration(
+ static_cast<steady_clock::rep>((nanosecs_per_tic) * pcount.QuadPart)));
}
- monotonic_clock::time_point monotonic_clock::now( system::error_code & ec )
+ steady_clock::time_point steady_clock::now( system::error_code & ec )
{
static double nanosecs_per_tic = chrono_detail::get_nanosecs_per_tic();
@@ -74,12 +74,12 @@
system::system_error(
cause,
BOOST_CHRONO_SYSTEM_CATEGORY,
- "chrono::monotonic_clock" ));
+ "chrono::steady_clock" ));
}
else
{
ec.assign( cause, BOOST_CHRONO_SYSTEM_CATEGORY );
- return monotonic_clock::time_point(duration(0));
+ return steady_clock::time_point(duration(0));
}
}
@@ -88,7 +88,7 @@
ec.clear();
}
return time_point(duration(
- static_cast<monotonic_clock::rep>(nanosecs_per_tic * pcount.QuadPart)));
+ static_cast<steady_clock::rep>(nanosecs_per_tic * pcount.QuadPart)));
}
BOOST_CHRONO_INLINE
Modified: trunk/boost/chrono/detail/inlined/win/process_clock.hpp
==============================================================================
--- trunk/boost/chrono/detail/inlined/win/process_clock.hpp (original)
+++ trunk/boost/chrono/detail/inlined/win/process_clock.hpp 2011-01-07 16:33:39 EST (Fri, 07 Jan 2011)
@@ -32,7 +32,7 @@
// note that Windows uses 100 nanosecond ticks for FILETIME
boost::detail::win32::FILETIME_ creation, exit, user_time, system_time;
- times_.real = duration( monotonic_clock::now().time_since_epoch().count() );
+ times_.real = duration( steady_clock::now().time_since_epoch().count() );
if ( boost::detail::win32::GetProcessTimes(
boost::detail::win32::GetCurrentProcess(), &creation, &exit,
Modified: trunk/boost/chrono/detail/inlined/win/process_cpu_clocks.hpp
==============================================================================
--- trunk/boost/chrono/detail/inlined/win/process_cpu_clocks.hpp (original)
+++ trunk/boost/chrono/detail/inlined/win/process_cpu_clocks.hpp 2011-01-07 16:33:39 EST (Fri, 07 Jan 2011)
@@ -41,7 +41,7 @@
{
ec.clear();
}
- return time_point(monotonic_clock::now().time_since_epoch());
+ return time_point(steady_clock::now().time_since_epoch());
}
else
{
@@ -156,7 +156,7 @@
ec.clear();
}
time_point::rep r(
- monotonic_clock::now().time_since_epoch().count(),
+ steady_clock::now().time_since_epoch().count(),
((static_cast<process_user_cpu_clock::rep>(user_time.dwHighDateTime) << 32)
| user_time.dwLowDateTime
) * 100,
Modified: trunk/boost/chrono/process_cpu_clocks.hpp
==============================================================================
--- trunk/boost/chrono/process_cpu_clocks.hpp (original)
+++ trunk/boost/chrono/process_cpu_clocks.hpp 2011-01-07 16:33:39 EST (Fri, 07 Jan 2011)
@@ -30,7 +30,7 @@
typedef duration::rep rep;
typedef duration::period period;
typedef chrono::time_point<process_real_cpu_clock> time_point;
- BOOST_CHRONO_STATIC_CONSTEXPR bool is_monotonic = true;
+ BOOST_CHRONO_STATIC_CONSTEXPR bool is_steady = true;
static BOOST_CHRONO_INLINE time_point now(
system::error_code & ec = BOOST_CHRONO_THROWS );
@@ -42,7 +42,7 @@
typedef duration::rep rep;
typedef duration::period period;
typedef chrono::time_point<process_user_cpu_clock> time_point;
- BOOST_CHRONO_STATIC_CONSTEXPR bool is_monotonic = true;
+ BOOST_CHRONO_STATIC_CONSTEXPR bool is_steady = true;
static BOOST_CHRONO_INLINE time_point now(
system::error_code & ec = BOOST_CHRONO_THROWS );
@@ -54,7 +54,7 @@
typedef duration::rep rep;
typedef duration::period period;
typedef chrono::time_point<process_system_cpu_clock> time_point;
- BOOST_CHRONO_STATIC_CONSTEXPR bool is_monotonic = true;
+ BOOST_CHRONO_STATIC_CONSTEXPR bool is_steady = true;
static BOOST_CHRONO_INLINE time_point now(
system::error_code & ec = BOOST_CHRONO_THROWS );
@@ -178,7 +178,7 @@
typedef duration::rep rep;
typedef duration::period period;
typedef chrono::time_point<process_cpu_clock> time_point;
- BOOST_CHRONO_STATIC_CONSTEXPR bool is_monotonic = true;
+ BOOST_CHRONO_STATIC_CONSTEXPR bool is_steady = true;
static BOOST_CHRONO_INLINE time_point now(
system::error_code & ec = BOOST_CHRONO_THROWS );
Modified: trunk/boost/chrono/process_times.hpp
==============================================================================
--- trunk/boost/chrono/process_times.hpp (original)
+++ trunk/boost/chrono/process_times.hpp 2011-01-07 16:33:39 EST (Fri, 07 Jan 2011)
@@ -39,7 +39,7 @@
typedef duration::rep rep;
typedef duration::period period;
typedef chrono::time_point<process_clock> time_point;
- BOOST_CHRONO_STATIC_CONSTEXPR bool is_monotonic = true;
+ BOOST_CHRONO_STATIC_CONSTEXPR bool is_steady = true;
struct durations
{
Modified: trunk/boost/chrono/system_clocks.hpp
==============================================================================
--- trunk/boost/chrono/system_clocks.hpp (original)
+++ trunk/boost/chrono/system_clocks.hpp 2011-01-07 16:33:39 EST (Fri, 07 Jan 2011)
@@ -91,12 +91,12 @@
// Clocks
class BOOST_CHRONO_DECL system_clock;
-#ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
- class BOOST_CHRONO_DECL monotonic_clock; // as permitted by [time.clock.monotonic]
+#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
+ class BOOST_CHRONO_DECL steady_clock; // as permitted by [time.clock.steady]
#endif
-#ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
- typedef monotonic_clock high_resolution_clock; // as permitted by [time.clock.hires]
+#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
+ typedef steady_clock high_resolution_clock; // as permitted by [time.clock.hires]
#else
typedef system_clock high_resolution_clock; // as permitted by [time.clock.hires]
#endif
@@ -125,7 +125,7 @@
typedef duration::rep rep;
typedef duration::period period;
typedef chrono::time_point<system_clock> time_point;
- BOOST_CHRONO_STATIC_CONSTEXPR bool is_monotonic = false;
+ BOOST_CHRONO_STATIC_CONSTEXPR bool is_steady = false;
static BOOST_CHRONO_INLINE time_point now(); // throws on error
static BOOST_CHRONO_INLINE time_point now(system::error_code & ec); // never throws
@@ -135,21 +135,21 @@
};
//----------------------------------------------------------------------------//
-// 20.9.5.2 Class monotonic_clock [time.clock.monotonic] //
+// 20.9.5.2 Class steady_clock [time.clock.steady] //
//----------------------------------------------------------------------------//
-// As permitted by [time.clock.monotonic]
-// The class monotonic_clock is conditionally supported.
+// As permitted by [time.clock.steady]
+// The class steady_clock is conditionally supported.
-#ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
- class BOOST_CHRONO_DECL monotonic_clock
+#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
+ class BOOST_CHRONO_DECL steady_clock
{
public:
typedef nanoseconds duration;
typedef duration::rep rep;
typedef duration::period period;
- typedef chrono::time_point<monotonic_clock> time_point;
- BOOST_CHRONO_STATIC_CONSTEXPR bool is_monotonic = true;
+ typedef chrono::time_point<steady_clock> time_point;
+ BOOST_CHRONO_STATIC_CONSTEXPR bool is_steady = true;
static BOOST_CHRONO_INLINE time_point now(); // throws on error
static BOOST_CHRONO_INLINE time_point now(system::error_code & ec); // never throws
@@ -159,7 +159,7 @@
// 20.9.5.3 Class high_resolution_clock [time.clock.hires] //
//----------------------------------------------------------------------------//
-// As permitted, monotonic_clock or system_clock is a typedef for high_resolution_clock.
+// As permitted, steady_clock or system_clock is a typedef for high_resolution_clock.
// See synopsis.
Modified: trunk/boost/chrono/thread_clock.hpp
==============================================================================
--- trunk/boost/chrono/thread_clock.hpp (original)
+++ trunk/boost/chrono/thread_clock.hpp 2011-01-07 16:33:39 EST (Fri, 07 Jan 2011)
@@ -30,7 +30,7 @@
typedef duration::rep rep;
typedef duration::period period;
typedef chrono::time_point<thread_clock> time_point;
- BOOST_CHRONO_STATIC_CONSTEXPR bool is_monotonic = BOOST_CHRONO_THREAD_CLOCK_IS_MONOTONIC;
+ BOOST_CHRONO_STATIC_CONSTEXPR bool is_steady = BOOST_CHRONO_THREAD_CLOCK_IS_STEADY;
static BOOST_CHRONO_INLINE time_point now( );
static BOOST_CHRONO_INLINE time_point now( system::error_code & ec );
Modified: trunk/boost/chrono/timer.hpp
==============================================================================
--- trunk/boost/chrono/timer.hpp (original)
+++ trunk/boost/chrono/timer.hpp 2011-01-07 16:33:39 EST (Fri, 07 Jan 2011)
@@ -51,8 +51,8 @@
};
typedef boost::chrono::timer< boost::chrono::system_clock > system_timer;
-#ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
- typedef boost::chrono::timer< boost::chrono::monotonic_clock > monotonic_timer;
+#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
+ typedef boost::chrono::timer< boost::chrono::steady_clock > steady_timer;
#endif
typedef boost::chrono::timer< boost::chrono::high_resolution_clock > high_resolution_timer;
Modified: trunk/boost/chrono/typeof/boost/chrono/chrono.hpp
==============================================================================
--- trunk/boost/chrono/typeof/boost/chrono/chrono.hpp (original)
+++ trunk/boost/chrono/typeof/boost/chrono/chrono.hpp 2011-01-07 16:33:39 EST (Fri, 07 Jan 2011)
@@ -24,8 +24,8 @@
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::chrono::time_point, (typename)(typename))
#if 0
BOOST_TYPEOF_REGISTER_TYPE(boost::chrono::system_clock)
-#ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
-BOOST_TYPEOF_REGISTER_TYPE(boost::chrono::monotonic_clock)
+#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
+BOOST_TYPEOF_REGISTER_TYPE(boost::chrono::steady_clock)
#endif
BOOST_TYPEOF_REGISTER_TYPE(boost::chrono::high_resolution_clock)
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk