Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r74343 - in sandbox/stopwatches: . boost boost/chrono boost/chrono/stopwatches boost/chrono/stopwatches/detail libs libs/chrono libs/chrono/stopwatches libs/chrono/stopwatches/doc libs/chrono/stopwatches/doc/html libs/chrono/stopwatches/doc/html/boost_chrono_stopwatches libs/chrono/stopwatches/doc/html/images libs/chrono/stopwatches/example libs/chrono/stopwatches/perf libs/chrono/stopwatches/test
From: vicente.botet_at_[hidden]
Date: 2011-09-11 08:44:04


Author: viboes
Date: 2011-09-11 08:43:58 EDT (Sun, 11 Sep 2011)
New Revision: 74343
URL: http://svn.boost.org/trac/boost/changeset/74343

Log:
Stopwatches: Reinsertion on Boost.Chrono
Added:
   sandbox/stopwatches/
   sandbox/stopwatches/boost/
   sandbox/stopwatches/boost/chrono/
   sandbox/stopwatches/boost/chrono/stopwatches/
   sandbox/stopwatches/boost/chrono/stopwatches.hpp (contents, props changed)
   sandbox/stopwatches/boost/chrono/stopwatches/clock_suspender.hpp (contents, props changed)
   sandbox/stopwatches/boost/chrono/stopwatches/config.hpp (contents, props changed)
   sandbox/stopwatches/boost/chrono/stopwatches/detail/
   sandbox/stopwatches/boost/chrono/stopwatches/detail/adaptive_string.hpp (contents, props changed)
   sandbox/stopwatches/boost/chrono/stopwatches/detail/default_out.hpp (contents, props changed)
   sandbox/stopwatches/boost/chrono/stopwatches/detail/static_assert.hpp (contents, props changed)
   sandbox/stopwatches/boost/chrono/stopwatches/lightweight_stopwatch.hpp (contents, props changed)
   sandbox/stopwatches/boost/chrono/stopwatches/scoped_stopclock.hpp (contents, props changed)
   sandbox/stopwatches/boost/chrono/stopwatches/stopclock.hpp (contents, props changed)
   sandbox/stopwatches/boost/chrono/stopwatches/stopclock_accumulator.hpp (contents, props changed)
   sandbox/stopwatches/boost/chrono/stopwatches/stopwatch.hpp (contents, props changed)
   sandbox/stopwatches/boost/chrono/stopwatches/stopwatch_accumulator.hpp (contents, props changed)
   sandbox/stopwatches/boost/chrono/stopwatches/stopwatch_accumulator_formatter.hpp (contents, props changed)
   sandbox/stopwatches/boost/chrono/stopwatches/stopwatch_accumulator_time_formatter.hpp (contents, props changed)
   sandbox/stopwatches/boost/chrono/stopwatches/stopwatch_formatter.hpp (contents, props changed)
   sandbox/stopwatches/boost/chrono/stopwatches/stopwatch_reporter.hpp (contents, props changed)
   sandbox/stopwatches/boost/chrono/stopwatches/stopwatch_scoped.hpp (contents, props changed)
   sandbox/stopwatches/boost/chrono/stopwatches/stopwatches.hpp (contents, props changed)
   sandbox/stopwatches/boost/chrono/stopwatches/suspendible_clock.hpp (contents, props changed)
   sandbox/stopwatches/boost/chrono/stopwatches/t24_hours.hpp (contents, props changed)
   sandbox/stopwatches/boost/chrono/stopwatches/t24_hours_formatter.hpp (contents, props changed)
   sandbox/stopwatches/boost/chrono/stopwatches/time_formatter.hpp (contents, props changed)
   sandbox/stopwatches/libs/
   sandbox/stopwatches/libs/chrono/
   sandbox/stopwatches/libs/chrono/stopwatches/
   sandbox/stopwatches/libs/chrono/stopwatches/Jamroot.jam (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/boost-build.jam (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/doc/
   sandbox/stopwatches/libs/chrono/stopwatches/doc/Jamfile.v2 (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/doc/html/
   sandbox/stopwatches/libs/chrono/stopwatches/doc/html/boost_chrono_stopwatches/
   sandbox/stopwatches/libs/chrono/stopwatches/doc/html/boost_chrono_stopwatches/appendices.html (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/doc/html/boost_chrono_stopwatches/overview.html (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/doc/html/boost_chrono_stopwatches/reference.html (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/doc/html/boost_chrono_stopwatches/users_guide.html (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/doc/html/boostbook.css (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/doc/html/images/
   sandbox/stopwatches/libs/chrono/stopwatches/doc/html/images/alert.png (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/doc/html/images/blank.png (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/doc/html/images/caution.png (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/doc/html/images/draft.png (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/doc/html/images/home.png (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/doc/html/images/important.png (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/doc/html/images/next.png (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/doc/html/images/next_disabled.png (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/doc/html/images/note.png (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/doc/html/images/prev.png (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/doc/html/images/prev_disabled.png (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/doc/html/images/smiley.png (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/doc/html/images/tip.png (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/doc/html/images/toc-blank.png (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/doc/html/images/toc-minus.png (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/doc/html/images/toc-plus.png (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/doc/html/images/up.png (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/doc/html/images/up_disabled.png (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/doc/html/images/warning.png (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/doc/html/index.html (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/doc/html/standalone_HTML.manifest (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/doc/index.html (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/doc/stopwatches.qbk (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/example/
   sandbox/stopwatches/libs/chrono/stopwatches/example/loop_stopclock_accumulator_example.cpp (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/example/nested_stopclock_accumulator_example.cpp (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/example/scoped_stopclock_example.cpp (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/example/scoped_stopwatch_example.cpp (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/example/sleep_for.hpp (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/example/specific_stopwatch_accumulator_example.cpp (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/example/stopclock_accumulator_example.cpp (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/example/stopclock_example.cpp (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/example/stopwatch_accumulator_example.cpp (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/example/stopwatch_example.cpp (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/example/suspendible_stopclock_example.cpp (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/example/t24_hours_example.cpp (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/example/timex.cpp (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/perf/
   sandbox/stopwatches/libs/chrono/stopwatches/perf/stopclock_perf.cpp (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/test/
   sandbox/stopwatches/libs/chrono/stopwatches/test/Jamfile.v2 (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/test/stopclock_constructor_overload_test.cpp (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/test/test_minmax.cpp (contents, props changed)
   sandbox/stopwatches/libs/chrono/stopwatches/test/wstopclock_constructor_overload_test.cpp (contents, props changed)

Added: sandbox/stopwatches/boost/chrono/stopwatches.hpp
==============================================================================
--- (empty file)
+++ sandbox/stopwatches/boost/chrono/stopwatches.hpp 2011-09-11 08:43:58 EDT (Sun, 11 Sep 2011)
@@ -0,0 +1,20 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Vicente J. Botet Escriba 2010.
+// Distributed under the Boost
+// Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or
+// copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/stm for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_STOPWATCHES_HPP
+#define BOOST_STOPWATCHES_HPP
+
+//-----------------------------------------------------------------------------
+#include <boost/chrono/stopwatches/stopwatches.hpp>
+//-----------------------------------------------------------------------------
+
+#endif // BOOST_STOPWATCHES_HPP

Added: sandbox/stopwatches/boost/chrono/stopwatches/clock_suspender.hpp
==============================================================================
--- (empty file)
+++ sandbox/stopwatches/boost/chrono/stopwatches/clock_suspender.hpp 2011-09-11 08:43:58 EDT (Sun, 11 Sep 2011)
@@ -0,0 +1,37 @@
+// boost/chrono/stopwatches/clock_suspender.hpp -----------------------------------------------------------//
+// Copyright 2009-2011 Vicente J. Botet Escriba
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+// See http://www.boost.org/libs/chrono/stopwatches for documentation.
+
+#ifndef BOOST_STOPWATCHES_CLOCK_SUSPENDER_CLOCK_HPP
+#define BOOST_STOPWATCHES_CLOCK_SUSPENDER_CLOCK_HPP
+
+#include <boost/system/error_code.hpp>
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace chrono {
+
+
+ template <class Clock>
+ struct is_suspendible : mpl:: false_ {};
+
+ template <class Clock>
+ class clock_suspender {
+ public:
+ clock_suspender(system::error_code & ec = BOOST_CHRONO_THROWS) {
+ ec.clear();
+ }
+ ~clock_suspender() {}
+ private:
+ //~ clock_suspender(); // = delete;
+ clock_suspender(const clock_suspender&); // = delete;
+ clock_suspender& operator=(const clock_suspender&); // = delete;
+ };
+
+
+} // namespace chrono
+} // namespace boost
+
+
+#endif // BOOST_CHRONO_PROCESS_CPU_CLOCKS_HPP

Added: sandbox/stopwatches/boost/chrono/stopwatches/config.hpp
==============================================================================
--- (empty file)
+++ sandbox/stopwatches/boost/chrono/stopwatches/config.hpp 2011-09-11 08:43:58 EDT (Sun, 11 Sep 2011)
@@ -0,0 +1,14 @@
+// boost/chrono/stopwatches/config.hpp -------------------------------------------------//
+// Copyright Beman Dawes 2003, 2006, 2008
+// Copyright 2009-2011 Vicente J. Botet Escriba
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+// See http://www.boost.org/libs/chrono/stopwatches for documentation.
+
+#ifndef BOOST_STOPWATCHES_CONFIG_HPP
+#define BOOST_STOPWATCHES_CONFIG_HPP
+
+#include <boost/config.hpp>
+
+#endif // BOOST_STOPWATCHES_CONFIG_HPP
+

Added: sandbox/stopwatches/boost/chrono/stopwatches/detail/adaptive_string.hpp
==============================================================================
--- (empty file)
+++ sandbox/stopwatches/boost/chrono/stopwatches/detail/adaptive_string.hpp 2011-09-11 08:43:58 EDT (Sun, 11 Sep 2011)
@@ -0,0 +1,63 @@
+// boost/chrono/stopwatch_formatter.hpp ------------------------------------------------------------//
+// Copyright 2009-2011 Vicente J. Botet Escriba
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+// See http://www.boost.org/libs/chrono/stopwatches for documentation.
+
+#ifndef BOOST_STOPWATCHES_DETAIL_ADAPTIVE_STRING_HPP
+#define BOOST_STOPWATCHES_DETAIL_ADAPTIVE_STRING_HPP
+
+#include <string>
+
+namespace boost { namespace chrono {
+
+namespace detail {
+
+ /**
+ * this class is a shim between std::string type and wchar_t type.
+ * it accepts a std::string type and returns a std::string or
+ * std::wstring according to the context(e.g. type on the left side
+ * of '=' operator):
+ * - in case of a string type, it forwards the passed-in std::string
+ * - in case of a wstring type, it widens it passed-in std::string
+ * before forwarding
+ *
+ * typical usage:
+ * std::string s = adaptive_string("hello"); // s = "hello"
+ * std::wstring ws = adaptive_string("hello"); // ws = L"hello"
+ * N.B. it doe not do any code conversion like: MBCS <--> UNICODE
+ */
+
+ struct adaptive_string
+ {
+ adaptive_string(const std::string& s):str_(s)
+ {}
+
+ // implicit convert to any basic_string
+ template <
+ typename CharT,
+ typename Traits,
+ class Alloc
+ >
+ operator std::basic_string<CharT, Traits, Alloc>() const
+ {
+ //return str_;
+ std::basic_string<CharT, Traits, Alloc> s;
+ s.assign(str_.begin(), str_.end());
+ return s;
+ }
+ adaptive_string(const adaptive_string& rhs) : str_(rhs.str_)
+ {}
+
+ private:
+ const std::string& str_;
+ adaptive_string& operator=(const adaptive_string&); // = delete;
+ };
+
+
+} // namespace detail
+} // namespace chrono
+} // namespace boost
+
+
+#endif

Added: sandbox/stopwatches/boost/chrono/stopwatches/detail/default_out.hpp
==============================================================================
--- (empty file)
+++ sandbox/stopwatches/boost/chrono/stopwatches/detail/default_out.hpp 2011-09-11 08:43:58 EDT (Sun, 11 Sep 2011)
@@ -0,0 +1,39 @@
+// boost/chrono/stopwatch_formatter.hpp ------------------------------------------------------------//
+// Copyright 2009-2011 Vicente J. Botet Escriba
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+// See http://www.boost.org/libs/chrono/stopwatches for documentation.
+
+#ifndef BOOST_STOPWATCHES_DETAIL_DEFAULT_OUT_HPP
+#define BOOST_STOPWATCHES_DETAIL_DEFAULT_OUT_HPP
+
+#include <boost/chrono/stopwatches/config.hpp>
+#include <iostream>
+
+namespace boost { namespace chrono {
+
+
+namespace detail {
+ template <typename CharT,typename Traits>
+ struct default_out;
+ template <typename Traits>
+ struct default_out<char,Traits> {
+ static std::basic_ostream<char,Traits>& apply() {
+ return std::cout;
+ }
+ };
+#ifndef BOOST_NO_STD_WSTRING
+ template <typename Traits>
+ struct default_out<wchar_t,Traits> {
+ static std::basic_ostream<wchar_t,Traits>& apply() {
+ return std::wcout;
+ }
+ };
+#endif
+}
+
+ } // namespace chrono
+} // namespace boost
+
+
+#endif

Added: sandbox/stopwatches/boost/chrono/stopwatches/detail/static_assert.hpp
==============================================================================
--- (empty file)
+++ sandbox/stopwatches/boost/chrono/stopwatches/detail/static_assert.hpp 2011-09-11 08:43:58 EDT (Sun, 11 Sep 2011)
@@ -0,0 +1,28 @@
+// boost/stopwatches/detail/static_assert.hpp --------------------------------------------------------------//
+// Copyright 2009-2011 Vicente J. Botet Escriba
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+// See http://www.boost.org/libs/chrono/stopwatches for documentation.
+
+#ifndef BOOST_STOPWATCHES_DETAIL_STATIC_ASSERT_HPP
+#define BOOST_STOPWATCHES_DETAIL_STATIC_ASSERT_HPP
+
+#include <boost/chrono/stopwatches/config.hpp>
+
+#ifndef BOOST_NO_STATIC_ASSERT
+#define BOOST_STOPWATCHES_STATIC_ASSERT(CND, MSG, TYPES) static_assert(CND,MSG)
+#elif defined(BOOST_STOPWATCHES_USES_STATIC_ASSERT)
+#include <boost/static_assert.hpp>
+#define BOOST_STOPWATCHES_STATIC_ASSERT(CND, MSG, TYPES) BOOST_STATIC_ASSERT(CND)
+#elif defined(BOOST_STOPWATCHES_USES_MPL_ASSERT)
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/bool.hpp>
+#define BOOST_STOPWATCHES_STATIC_ASSERT(CND, MSG, TYPES) \
+ BOOST_MPL_ASSERT_MSG(boost::mpl::bool_< (CND) >::type::value, MSG, TYPES)
+#elif defined(BOOST_STOPWATCHES_USES_ARRAY_ASSERT)
+#define BOOST_STOPWATCHES_STATIC_ASSERT(CND, MSG, TYPES) static char BOOST_JOIN(boost_chrono_test_,__LINE__)[CND]
+#else
+#define BOOST_STOPWATCHES_STATIC_ASSERT(CND, MSG, TYPES)
+#endif
+
+#endif // BOOST_STOPWATCHES_DETAIL_STATIC_ASSERT_HPP

Added: sandbox/stopwatches/boost/chrono/stopwatches/lightweight_stopwatch.hpp
==============================================================================
--- (empty file)
+++ sandbox/stopwatches/boost/chrono/stopwatches/lightweight_stopwatch.hpp 2011-09-11 08:43:58 EDT (Sun, 11 Sep 2011)
@@ -0,0 +1,287 @@
+// boost/chrono/stopwatches/lightweight_stopwatch.hpp ------------------------------------------------------------//
+// Copyright 2011 Vicente J. Botet Escriba
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+// See http://www.boost.org/libs/libs/chrono/stopwatches for documentation.
+
+#ifndef BOOST_STOPWATCHES_LIGHTWEIGHT_STOPWATCH__HPP
+#define BOOST_STOPWATCHES_LIGHTWEIGHT_STOPWATCH__HPP
+
+#include <utility>
+
+#include <boost/chrono/chrono.hpp>
+#include <boost/chrono/stopwatches/stopwatch_scoped.hpp>
+#include <boost/system/error_code.hpp>
+#include <boost/accumulators/framework/accumulator_set.hpp>
+#include <boost/accumulators/statistics/count.hpp>
+#include <boost/accumulators/statistics/sum.hpp>
+#include <boost/accumulators/statistics/min.hpp>
+#include <boost/accumulators/statistics/max.hpp>
+#include <boost/accumulators/statistics/mean.hpp>
+
+namespace boost
+{
+ namespace chrono
+ {
+
+ template <typename Features, typename Weight=void>
+ struct lightweight_stopwatch_accumulator_set_traits {
+ template <typename D>
+ struct apply {
+ struct type {
+ typedef accumulators::accumulator_set<typename D::rep, Features, Weight> storage_type;
+ typedef D duration_type;
+ static duration_type get_duration(storage_type& acc_) { return duration_type(accumulators::sum(acc_)); }
+ static void set_duration(storage_type& acc_, duration_type d) { acc_(d.count()); }
+ static void reset(storage_type& acc_) { acc_=storage_type(); }
+ };
+ };
+ };
+
+ struct lightweight_stopwatch_identity_traits {
+ template <typename D>
+ struct apply {
+ struct type {
+ typedef D duration_type;
+ typedef duration_type storage_type;
+ static duration_type get_duration(storage_type& acc_) { return acc_; }
+ static void set_duration(storage_type& acc_, duration_type d) { acc_=d; }
+ static void reset(storage_type& acc_) { acc_=storage_type(); }
+ };
+ };
+
+ };
+
+
+ struct dont_start_t{};
+ static const dont_start_t dont_start = {};
+
+ // forward declaration
+ template <
+ typename Clock=chrono::high_resolution_clock,
+ typename Traits=lightweight_stopwatch_identity_traits
+ >
+ class lightweight_stopwatch;
+
+
+//--------------------------------------------------------------------------------------//
+ template <typename Clock, typename Traits>
+ class lightweight_stopwatch
+ {
+ public:
+ typedef typename Traits::template apply<typename Clock::duration>::type traits;
+ typedef typename traits::storage_type storage_type;
+ typedef Clock clock;
+ typedef typename Clock::duration duration;
+ typedef typename Clock::time_point time_point;
+ typedef typename Clock::rep rep;
+ typedef typename Clock::period period;
+
+ explicit lightweight_stopwatch( storage_type& acc, system::error_code & ec = BOOST_CHRONO_THROWS )
+ : running_(false), suspended_(false),
+ start_(duration::zero()), level_(0), partial_(duration::zero()), suspend_level_(0)
+ , storage_(&acc), construction_(clock::now( ))
+ {
+ start(ec);
+ }
+
+ lightweight_stopwatch( storage_type& acc, const dont_start_t& )
+ : running_(false), suspended_(false),
+ start_(duration::zero()), level_(0), partial_(duration::zero()), suspend_level_(0)
+ , storage_(&acc), construction_(clock::now( ))
+ {
+ }
+
+ ~lightweight_stopwatch() {
+ system::error_code ec;
+ stop(ec);
+ }
+
+
+//--------------------------------------------------------------------------------------//
+ std::pair<duration, time_point> restart( system::error_code & ec = BOOST_CHRONO_THROWS )
+ {
+ time_point tmp=clock::now( ec );
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return time_point();
+ }
+ if (running_&&(level_==1)) {
+ partial_ += tmp - start_;
+ traits::set_duration(get_storage(),partial_);
+ partial_=duration::zero();
+ } else {
+ running_=true;
+ }
+ start_=tmp;
+ return std::make_pair(traits::get_duration(get_storage()),start_);
+ }
+
+ time_point start( system::error_code & ec = BOOST_CHRONO_THROWS )
+ {
+ if (!running_) {
+ time_point tmp = clock::now( ec );
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) {
+ return time_point();
+ }
+ }
+ start_ = tmp;
+ ++level_;
+ running_ = true;
+ return start_;
+ } else {
+ ++level_;
+ ec.clear();
+ return time_point();
+ }
+ }
+
+ duration stop( system::error_code & ec = BOOST_CHRONO_THROWS )
+ {
+ if (running_ && (--level_==0)) {
+ time_point tmp=clock::now( ec );
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return duration::zero();
+ }
+ partial_ += tmp - start_;
+ traits::set_duration(get_storage(),partial_);
+ partial_=duration::zero();
+ running_=false;
+ return traits::get_duration(get_storage());
+ } else {
+ ec.clear();
+ return duration::zero();
+ }
+ }
+
+ duration suspend( system::error_code & ec = BOOST_CHRONO_THROWS )
+ {
+ if (running_) {
+ if (!suspended_) {
+ time_point tmp=clock::now( ec );
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return duration::zero();
+ }
+ ++suspend_level_;
+ partial_ += tmp - start_;
+ suspended_=true;
+ return traits::get_duration(get_storage());
+ } else {
+ ++suspend_level_;
+ ec.clear();
+ return duration::zero();
+ }
+ } else {
+ ec.clear();
+ return duration::zero();
+ }
+ }
+
+ time_point resume( system::error_code & ec = BOOST_CHRONO_THROWS )
+ {
+ if (suspended_&&(--suspend_level_==0)) {
+ time_point tmp = clock::now( ec );
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return time_point();
+ }
+ start_ = tmp;
+ suspended_=false;
+ return start_;
+ } else {
+ ec.clear();
+ return time_point();
+ }
+ }
+
+ duration elapsed( system::error_code & ec = BOOST_CHRONO_THROWS )
+ {
+ if (running_) {
+ if (suspended_)
+ return traits::get_duration(get_storage());
+ else {
+ time_point tmp = clock::now( ec );
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return duration::zero();
+ }
+ return traits::get_duration(get_storage())+tmp - start_;
+ }
+ } else {
+ return traits::get_duration(get_storage());
+ }
+ }
+
+ time_point now( system::error_code & ec = BOOST_CHRONO_THROWS )
+ {
+ return time_point(elapsed( ec ));
+ }
+
+ void reset( system::error_code & ec = BOOST_CHRONO_THROWS )
+ {
+ construction_=clock::now( ec );
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return;
+ }
+ traits::reset(get_storage());
+ running_=false;
+ suspended_=false;
+ partial_ = duration::zero();
+ start_ = time_point(duration::zero());
+ level_=0;
+ suspend_level_=0;
+ }
+
+ storage_type& get_storage( )
+ {
+ return *storage_;
+ }
+
+ duration lifetime( system::error_code & ec = BOOST_CHRONO_THROWS )
+ {
+ return clock::now( ec ) - construction_;
+ }
+
+ typedef stopwatch_runner<lightweight_stopwatch<Clock,Traits> > scoped_run;
+ typedef stopwatch_stopper<lightweight_stopwatch<Clock,Traits> > scoped_stop;
+ typedef stopwatch_suspender<lightweight_stopwatch<Clock,Traits> > scoped_suspend;
+ typedef stopwatch_resumer<lightweight_stopwatch<Clock,Traits> > scoped_resume;
+ private:
+ bool running_;
+ bool suspended_;
+ time_point start_;
+ std::size_t level_;
+ duration partial_;
+ std::size_t suspend_level_;
+ storage_type* storage_;
+ time_point construction_;
+ };
+
+//--------------------------------------------------------------------------------------//
+ typedef accumulators::features<
+ accumulators::tag::count,
+ accumulators::tag::sum,
+ accumulators::tag::min,
+ accumulators::tag::max,
+ accumulators::tag::mean
+ > default_features;
+ typedef boost::chrono::lightweight_stopwatch< boost::chrono::system_clock > system_lightweight_stopwatch;
+#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
+ typedef boost::chrono::lightweight_stopwatch< boost::chrono::steady_clock > steady_lightweight_stopwatch;
+#endif
+ typedef boost::chrono::lightweight_stopwatch< boost::chrono::high_resolution_clock > high_resolution_lightweight_stopwatch;
+
+ typedef boost::chrono::lightweight_stopwatch< boost::chrono::system_clock,
+ lightweight_stopwatch_accumulator_set_traits<default_features> > system_lightweight_stopwatch_accumulator;
+#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
+ typedef boost::chrono::lightweight_stopwatch< boost::chrono::steady_clock,
+ lightweight_stopwatch_accumulator_set_traits<default_features> > steady_lightweight_stopwatch_accumulator;
+#endif
+ typedef boost::chrono::lightweight_stopwatch< boost::chrono::high_resolution_clock,
+ lightweight_stopwatch_accumulator_set_traits<default_features> > high_resolution_lightweight_stopwatch_accumulator;
+
+//--------------------------------------------------------------------------------------//
+
+
+ } // namespace chrono
+} // namespace boost
+
+#endif

Added: sandbox/stopwatches/boost/chrono/stopwatches/scoped_stopclock.hpp
==============================================================================
--- (empty file)
+++ sandbox/stopwatches/boost/chrono/stopwatches/scoped_stopclock.hpp 2011-09-11 08:43:58 EDT (Sun, 11 Sep 2011)
@@ -0,0 +1,115 @@
+// boost/chrono/stopwatches/stopclock.hpp ------------------------------------------------------------//
+// Copyright 2009-2011 Vicente J. Botet Escriba
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+// See http://www.boost.org/libs/chrono/stopwatches for documentation.
+
+#ifndef BOOST_STOPWATCHES_SCOPED_STOPCLOCK_HPP
+#define BOOST_STOPWATCHES_SCOPED_STOPCLOCK_HPP
+
+#include <boost/chrono/stopwatches/stopwatch_reporter.hpp>
+#include <boost/chrono/stopwatches/stopwatch.hpp>
+#include <boost/chrono/process_cpu_clocks.hpp>
+#include <boost/chrono/stopwatches/time_formatter.hpp>
+#include <boost/chrono/stopwatches/stopwatch_accumulator_time_formatter.hpp>
+
+namespace boost { namespace chrono {
+
+//--------------------------------------------------------------------------------------//
+//~ provides a everything a Timer provides and it adds reporting capabilities that can be invoked in a single line of code. The reporting is controleed by two parameters:
+
+ //~ * format : The output format
+ //~ * places(precission): the number of decimal placess used.
+
+//~ The default places is given by default_places and is 3. The default format is "\n%ts\n", where
+
+ //~ * %t : the result of elapsed() when the reporting is done.
+
+//~ The time is given using the suffix "s" following the System International d'Unites Std.
+
+/* void f1()
+ * {
+ * stopclock<> _;
+ * // ...
+ * }
+ */
+//--------------------------------------------------------------------------------------//
+
+ template <class Clock=chrono::process_cpu_clock, class Formatter=typename stopwatch_reporter_default_formatter<chrono::stopwatch<Clock> >::type >
+ class scoped_stopclock
+ : public stopwatch_reporter<chrono::stopwatch<Clock>, Formatter> {
+ typedef stopwatch_reporter<chrono::stopwatch<Clock>, Formatter> base_type;
+ public:
+ typedef Clock clock;
+ typedef chrono::stopwatch<Clock> stopwatch;
+ typedef Formatter formatter;
+ typedef typename Formatter::string_type string_type;
+ typedef typename Formatter::char_type char_type;
+ typedef typename Formatter::ostream_type ostream_type;
+
+ explicit scoped_stopclock( const string_type& func, system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(ec), func_(func)
+ { begin(); }
+ scoped_stopclock( const string_type& func, ostream_type & os,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, ec), func_(func)
+ { begin(); }
+
+ scoped_stopclock( const string_type& func, const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(format, ec), func_(func)
+ { begin(); }
+
+ scoped_stopclock( const string_type& func, int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(places, ec), func_(func)
+ { begin(); }
+
+ scoped_stopclock( const string_type& func, ostream_type & os, const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, format, ec), func_(func)
+ { begin(); }
+
+ scoped_stopclock( const string_type& func, const string_type & format, int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(format, places, ec), func_(func)
+ { begin(); }
+
+ scoped_stopclock( const string_type& func, ostream_type & os, int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, places, ec), func_(func)
+ { begin(); }
+
+ scoped_stopclock( const string_type& func, int places, const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(places, format, ec), func_(func)
+ { begin(); }
+
+ scoped_stopclock( const string_type& func, ostream_type & os, const string_type & format, int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, format, places, ec), func_(func)
+ { begin(); }
+
+ scoped_stopclock( const string_type& func, ostream_type & os, int places, const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, places, format, ec), func_(func)
+ { begin(); }
+
+ ~scoped_stopclock() {
+ this->m_os << "}}} " << func_ << " : ";
+ }
+ typedef typename base_type::scoped_run scoped_run;
+ typedef typename base_type::scoped_suspend scoped_suspend;
+ typedef typename base_type::scoped_resume scoped_resume;
+ private:
+ void begin() {
+ this->m_os << "{{{ " << func_ << std::endl;
+ }
+ string_type func_;
+
+ };
+
+ } // namespace chrono
+} // namespace boost
+
+#endif // BOOST_STOPWATCHES_STOPCLOCK_HPP

Added: sandbox/stopwatches/boost/chrono/stopwatches/stopclock.hpp
==============================================================================
--- (empty file)
+++ sandbox/stopwatches/boost/chrono/stopwatches/stopclock.hpp 2011-09-11 08:43:58 EDT (Sun, 11 Sep 2011)
@@ -0,0 +1,286 @@
+// boost/chrono/stopwatches/stopclock.hpp ------------------------------------------------------------//
+// Copyright 2009-2011 Vicente J. Botet Escriba
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+// See http://www.boost.org/libs/chrono/stopwatches for documentation.
+
+#ifndef BOOST_STOPWATCHES_STOPCLOCK_HPP
+#define BOOST_STOPWATCHES_STOPCLOCK_HPP
+
+#include <boost/chrono/stopwatches/config.hpp>
+#include <boost/chrono/stopwatches/detail/static_assert.hpp>
+#include <boost/chrono/stopwatches/stopwatch_reporter.hpp>
+#include <boost/chrono/stopwatches/stopwatch_formatter.hpp>
+#include <boost/chrono/stopwatches/time_formatter.hpp>
+#include <boost/chrono/stopwatches/stopwatch.hpp>
+#include <boost/chrono/stopwatches/suspendible_clock.hpp>
+#include <boost/chrono/process_cpu_clocks.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace chrono {
+
+//--------------------------------------------------------------------------------------//
+//~ provides a everything a Timer provides and it adds reporting capabilities that can be invoked in a single line of code. The reporting is controleed by two parameters:
+
+ //~ * format : The output format
+ //~ * places(precission): the number of decimal placess used.
+
+//~ The default places is given by default_places and is 3. The default format is "\n%ts\n", where
+
+ //~ * %t : the result of elapsed() when the reporting is done.
+
+//~ The time is given using the suffix "s" following the System International d'Unites Std.
+
+/* void f1()
+ * {
+ * stopclock<> _;
+ * // ...
+ * }
+ */
+//--------------------------------------------------------------------------------------//
+
+ template <class Clock>
+ struct stopwatch_reporter_default_formatter<stopwatch<Clock> > {
+ typedef stopwatch_formatter type;
+ };
+
+ template <class Clock>
+ struct wstopwatch_reporter_default_formatter<stopwatch<Clock> > {
+ typedef wstopwatch_formatter type;
+ };
+
+ template <>
+ struct stopwatch_reporter_default_formatter<stopwatch<chrono::process_cpu_clock> > {
+ typedef time_formatter type;
+ };
+
+ template <>
+ struct wstopwatch_reporter_default_formatter<stopwatch<chrono::process_cpu_clock> > {
+ typedef wtime_formatter type;
+ };
+
+ template <>
+ struct stopwatch_reporter_default_formatter<stopwatch<chrono::suspendible_clock<chrono::process_cpu_clock> > > {
+ typedef stopwatch_reporter_default_formatter<stopwatch<chrono::process_cpu_clock> >::type type;
+ };
+
+ template <>
+ struct wstopwatch_reporter_default_formatter<stopwatch<chrono::suspendible_clock<chrono::process_cpu_clock> > > {
+ typedef wstopwatch_reporter_default_formatter<stopwatch<chrono::process_cpu_clock> >::type type;
+ };
+
+
+ template <class Clock, class Formatter>
+ class basic_stopclock : public basic_stopwatch_reporter<chrono::stopwatch<Clock>, Formatter> {
+ typedef basic_stopwatch_reporter<chrono::stopwatch<Clock>, Formatter> base_type;
+ public:
+ typedef Clock clock;
+ typedef chrono::stopwatch<Clock> stopwatch;
+ typedef Formatter formatter;
+ typedef typename Formatter::string_type string_type;
+ typedef typename Formatter::char_type char_type;
+ typedef typename Formatter::ostream_type ostream_type;
+
+ explicit basic_stopclock( system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(ec) { }
+ explicit basic_stopclock( ostream_type & os,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, ec) { }
+
+ explicit basic_stopclock( const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(format, ec) { }
+
+ explicit basic_stopclock( int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(places, ec) { }
+
+ basic_stopclock( ostream_type & os, const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, format, ec) { }
+
+ basic_stopclock( const string_type & format, int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(format, places, ec) { }
+
+ basic_stopclock( ostream_type & os, int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, places, ec) { }
+
+ basic_stopclock( int places, const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(places, format, ec) { }
+
+ basic_stopclock( ostream_type & os, const string_type & format, int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, format, places, ec) { }
+
+ basic_stopclock( ostream_type & os, int places, const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, places, format, ec) { }
+
+ typedef stopwatch_runner<basic_stopclock> scoped_run;
+ typedef stopwatch_stopper<basic_stopclock> scoped_stop;
+ typedef stopwatch_suspender<basic_stopclock> scoped_suspend;
+ typedef stopwatch_resumer<basic_stopclock> scoped_resume;
+
+ };
+
+ template <class Clock, class Formatter>
+ struct stopwatch_reporter_default_formatter<basic_stopclock<Clock,Formatter> > {
+ typedef Formatter type;
+ };
+
+ template <class Clock=chrono::process_cpu_clock, class Formatter=typename stopwatch_reporter_default_formatter<stopwatch<Clock> >::type>
+ class stopclock;
+
+ template <class Clock, class Formatter>
+ struct stopwatch_reporter_default_formatter<stopclock<Clock,Formatter> > {
+ typedef Formatter type;
+ };
+
+ template <class Clock, class Formatter>
+ class stopclock : public basic_stopclock<Clock, Formatter> {
+ typedef basic_stopclock<Clock, Formatter> base_type;
+ public:
+ typedef Clock clock;
+ typedef chrono::stopwatch<Clock> stopwatch;
+ typedef Formatter formatter;
+ typedef typename Formatter::string_type string_type;
+ typedef typename Formatter::char_type char_type;
+ typedef typename Formatter::ostream_type ostream_type;
+
+ explicit stopclock( system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(ec) { }
+ explicit stopclock( ostream_type & os,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, ec) { }
+
+ explicit stopclock( const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(format, ec) { }
+
+ explicit stopclock( int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(places, ec) { }
+
+ stopclock( ostream_type & os, const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, format, ec) { }
+
+ stopclock( const string_type & format, int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(format, places, ec) { }
+
+ stopclock( ostream_type & os, int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, places, ec) { }
+
+ stopclock( int places, const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(places, format, ec) { }
+
+ stopclock( ostream_type & os, const string_type & format, int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, format, places, ec) { }
+
+ stopclock( ostream_type & os, int places, const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, places, format, ec) { }
+
+ typedef stopwatch_runner<stopclock> scoped_run;
+ typedef stopwatch_stopper<stopclock> scoped_stop;
+ typedef stopwatch_suspender<stopclock> scoped_suspend;
+ typedef stopwatch_resumer<stopclock> scoped_resume;
+
+ };
+
+ typedef stopclock< boost::chrono::system_clock > system_stopclock;
+ #ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
+ typedef stopclock< boost::chrono::steady_clock > steady_stopclock;
+ #endif
+ typedef stopclock< boost::chrono::high_resolution_clock > high_resolution_stopclock;
+ typedef stopclock< boost::chrono::process_real_cpu_clock > process_real_cpu_stopclock;
+ typedef stopclock< boost::chrono::process_user_cpu_clock > process_user_cpu_stopclock;
+ typedef stopclock< boost::chrono::process_system_cpu_clock > process_system_cpu_stopclock;
+ typedef stopclock< boost::chrono::process_cpu_clock > process_cpu_stopclock;
+
+ template <class Clock=chrono::process_cpu_clock, class Formatter=typename wstopwatch_reporter_default_formatter<stopwatch<Clock> >::type>
+ class wstopclock;
+
+ template <class Clock, class Formatter>
+ struct stopwatch_reporter_default_formatter<wstopclock<Clock,Formatter> > {
+ typedef Formatter type;
+ };
+
+ template <class Clock, class Formatter>
+ class wstopclock : public basic_stopclock<Clock, Formatter> {
+ typedef basic_stopclock<Clock, Formatter> base_type;
+ public:
+ typedef Clock clock;
+ typedef chrono::stopwatch<Clock> stopwatch;
+ typedef Formatter formatter;
+ typedef typename Formatter::string_type string_type;
+ typedef typename Formatter::char_type char_type;
+ typedef typename Formatter::ostream_type ostream_type;
+
+ explicit wstopclock( system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(ec) { }
+ explicit wstopclock( ostream_type & os,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, ec) { }
+
+ explicit wstopclock( const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(format, ec) { }
+
+ explicit wstopclock( int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(places, ec) { }
+
+ wstopclock( ostream_type & os, const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, format, ec) { }
+
+ wstopclock( const string_type & format, int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(format, places, ec) { }
+
+ wstopclock( ostream_type & os, int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, places, ec) { }
+
+ wstopclock( int places, const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(places, format, ec) { }
+
+ wstopclock( ostream_type & os, const string_type & format, int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, format, places, ec) { }
+
+ wstopclock( ostream_type & os, int places, const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, places, format, ec) { }
+
+ typedef stopwatch_runner<wstopclock> scoped_run;
+ typedef stopwatch_stopper<wstopclock> scoped_stop;
+ typedef stopwatch_suspender<wstopclock> scoped_suspend;
+ typedef stopwatch_resumer<wstopclock> scoped_resume;
+
+ };
+
+ typedef wstopclock< boost::chrono::system_clock > system_wstopclock;
+ #ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
+ typedef wstopclock< boost::chrono::steady_clock > steady_wstopclock;
+ #endif
+ typedef wstopclock< boost::chrono::high_resolution_clock > high_resolution_wstopclock;
+ typedef wstopclock< boost::chrono::process_real_cpu_clock > process_real_cpu_wstopclock;
+ typedef wstopclock< boost::chrono::process_user_cpu_clock > process_user_cpu_wstopclock;
+ typedef wstopclock< boost::chrono::process_system_cpu_clock > process_system_cpu_wstopclock;
+ typedef wstopclock< boost::chrono::process_cpu_clock > process_cpu_wstopclock;
+
+
+ } // namespace chrono
+} // namespace boost
+
+#endif // BOOST_STOPWATCHES_STOPCLOCK_HPP

Added: sandbox/stopwatches/boost/chrono/stopwatches/stopclock_accumulator.hpp
==============================================================================
--- (empty file)
+++ sandbox/stopwatches/boost/chrono/stopwatches/stopclock_accumulator.hpp 2011-09-11 08:43:58 EDT (Sun, 11 Sep 2011)
@@ -0,0 +1,288 @@
+// boost/chrono/stopwatches/stopclock.hpp ------------------------------------------------------------//
+// Copyright 2009-2011 Vicente J. Botet Escriba
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+// See http://www.boost.org/libs/chrono/stopwatches for documentation.
+
+#ifndef BOOST_STOPWATCHES_STOPCLOCK_ACCUMULATOR_HPP
+#define BOOST_STOPWATCHES_STOPCLOCK_ACCUMULATOR_HPP
+
+#include <boost/chrono/stopwatches/config.hpp>
+#include <boost/chrono/stopwatches/detail/static_assert.hpp>
+
+#include <boost/chrono/stopwatches/stopwatch_reporter.hpp>
+#include <boost/chrono/stopwatches/stopwatch_accumulator.hpp>
+#include <boost/chrono/stopwatches/stopwatch_accumulator_formatter.hpp>
+#include <boost/chrono/stopwatches/stopwatch_accumulator_time_formatter.hpp>
+#include <boost/chrono/stopwatches/suspendible_clock.hpp>
+#include <boost/chrono/chrono.hpp>
+#include <boost/chrono/process_cpu_clocks.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace chrono {
+
+//--------------------------------------------------------------------------------------//
+//~ provides a everything a Timer provides and it adds reporting capabilities that can be invoked in a single line of code. The reporting is controleed by two parameters:
+
+ //~ * format : The output format
+ //~ * places(precission): the number of decimal placess used.
+
+//~ The default places is given by default_places and is 3. The default format is "\n%ts\n", where
+
+ //~ * %t : the result of elapsed() when the reporting is done.
+
+//~ The time is given using the suffix "s" following the System International d'Unites Std.
+
+/* void f1()
+ * {
+ * stopclock<> _;
+ * // ...
+ * }
+ */
+//--------------------------------------------------------------------------------------//
+
+ template <class Clock, typename Features, typename Weight>
+ struct stopwatch_reporter_default_formatter<stopwatch_accumulator<Clock, Features,Weight> > {
+ typedef stopwatch_accumulator_formatter type;
+ };
+
+ template <class Clock, typename Features, typename Weight>
+ struct wstopwatch_reporter_default_formatter<stopwatch_accumulator<Clock, Features,Weight> > {
+ typedef wstopwatch_accumulator_formatter type;
+ };
+
+ template <typename Features, typename Weight>
+ struct stopwatch_reporter_default_formatter<stopwatch_accumulator<chrono::process_cpu_clock,Features,Weight> > {
+ typedef stopwatch_accumulator_time_formatter type;
+ };
+
+ template <typename Features, typename Weight>
+ struct wstopwatch_reporter_default_formatter<stopwatch_accumulator<chrono::process_cpu_clock, Features,Weight> > {
+ typedef wstopwatch_accumulator_time_formatter type;
+ };
+
+ template <typename Features, typename Weight>
+ struct stopwatch_reporter_default_formatter<stopwatch_accumulator<chrono::suspendible_clock<chrono::process_cpu_clock>, Features,Weight> > {
+ typedef stopwatch_reporter_default_formatter<stopwatch_accumulator<chrono::process_cpu_clock> >::type type;
+ };
+
+ template <typename Features, typename Weight>
+ struct wstopwatch_reporter_default_formatter<stopwatch_accumulator<chrono::suspendible_clock<chrono::process_cpu_clock>, Features,Weight> > {
+ typedef wstopwatch_reporter_default_formatter<stopwatch_accumulator<chrono::process_cpu_clock> >::type type;
+ };
+
+
+ template <class Clock, class Formatter>
+ class basic_stopclock_accumulator : public basic_stopwatch_reporter<stopwatch_accumulator<Clock>, Formatter> {
+ typedef basic_stopwatch_reporter<stopwatch_accumulator<Clock>, Formatter> base_type;
+ public:
+ typedef Clock clock;
+ typedef stopwatch_accumulator<Clock> stopwatch;
+ typedef Formatter formatter;
+ typedef typename Formatter::string_type string_type;
+ typedef typename Formatter::char_type char_type;
+ typedef typename Formatter::ostream_type ostream_type;
+
+ explicit basic_stopclock_accumulator( system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(ec) { }
+ explicit basic_stopclock_accumulator( ostream_type & os,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, ec) { }
+
+ explicit basic_stopclock_accumulator( const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(format, ec) { }
+
+ explicit basic_stopclock_accumulator( int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(places, ec) { }
+
+ basic_stopclock_accumulator( ostream_type & os, const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, format, ec) { }
+
+ basic_stopclock_accumulator( const string_type & format, int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(format, places, ec) { }
+
+ basic_stopclock_accumulator( ostream_type & os, int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, places, ec) { }
+
+ basic_stopclock_accumulator( int places, const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(places, format, ec) { }
+
+ basic_stopclock_accumulator( ostream_type & os, const string_type & format, int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, format, places, ec) { }
+
+ basic_stopclock_accumulator( ostream_type & os, int places, const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, places, format, ec) { }
+
+
+ typedef stopwatch_runner<basic_stopclock_accumulator> scoped_run;
+ typedef stopwatch_stopper<basic_stopclock_accumulator> scoped_stop;
+ typedef stopwatch_suspender<basic_stopclock_accumulator> scoped_suspend;
+ typedef stopwatch_resumer<basic_stopclock_accumulator> scoped_resume;
+ };
+
+ template <class Clock, class Formatter>
+ struct stopwatch_reporter_default_formatter<basic_stopclock_accumulator<Clock,Formatter> > {
+ typedef Formatter type;
+ };
+
+ template <class Clock=chrono::high_resolution_clock, class Formatter=typename stopwatch_reporter_default_formatter<stopwatch_accumulator<Clock> >::type>
+ class stopclock_accumulator;
+
+ template <class Clock, class Formatter>
+ struct stopwatch_reporter_default_formatter<stopclock_accumulator<Clock,Formatter> > {
+ typedef Formatter type;
+ };
+
+ template <class Clock, class Formatter>
+ class stopclock_accumulator : public basic_stopclock_accumulator<Clock, Formatter> {
+ typedef basic_stopclock_accumulator<Clock, Formatter> base_type;
+ public:
+ typedef Clock clock;
+ typedef stopwatch_accumulator<Clock> stopwatch;
+ typedef Formatter formatter;
+ typedef typename Formatter::string_type string_type;
+ typedef typename Formatter::char_type char_type;
+ typedef typename Formatter::ostream_type ostream_type;
+
+ explicit stopclock_accumulator( system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(ec) { }
+ explicit stopclock_accumulator( ostream_type & os,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, ec) { }
+
+ explicit stopclock_accumulator( const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(format, ec) { }
+
+ explicit stopclock_accumulator( int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(places, ec) { }
+
+ stopclock_accumulator( ostream_type & os, const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, format, ec) { }
+
+ stopclock_accumulator( const string_type & format, int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(format, places, ec) { }
+
+ stopclock_accumulator( ostream_type & os, int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, places, ec) { }
+
+ stopclock_accumulator( int places, const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(places, format, ec) { }
+
+ stopclock_accumulator( ostream_type & os, const string_type & format, int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, format, places, ec) { }
+
+ stopclock_accumulator( ostream_type & os, int places, const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, places, format, ec) { }
+
+
+ typedef stopwatch_runner<stopclock_accumulator> scoped_run;
+ typedef stopwatch_stopper<stopclock_accumulator> scoped_stop;
+ typedef stopwatch_suspender<stopclock_accumulator> scoped_suspend;
+ typedef stopwatch_resumer<stopclock_accumulator> scoped_resume;
+ };
+
+ typedef stopclock_accumulator< boost::chrono::system_clock > system_stopclock_accumulator;
+ #ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
+ typedef stopclock_accumulator< boost::chrono::steady_clock > steady_stopclock_accumulator;
+ #endif
+ typedef stopclock_accumulator< boost::chrono::high_resolution_clock > high_resolution_stopclock_accumulator;
+ typedef stopclock_accumulator< boost::chrono::process_real_cpu_clock > process_real_cpu_stopclock_accumulator;
+ typedef stopclock_accumulator< boost::chrono::process_user_cpu_clock > process_user_cpu_stopclock_accumulator;
+ typedef stopclock_accumulator< boost::chrono::process_system_cpu_clock > process_system_cpu_stopclock_accumulator;
+ typedef stopclock_accumulator< boost::chrono::process_cpu_clock > process_cpu_stopclock_accumulator;
+
+ template <class Clock=chrono::high_resolution_clock, class Formatter=typename wstopwatch_reporter_default_formatter<stopwatch_accumulator<Clock> >::type>
+ class wstopclock_accumulator;
+
+ template <class Clock, class Formatter>
+ struct stopwatch_reporter_default_formatter<wstopclock_accumulator<Clock,Formatter> > {
+ typedef Formatter type;
+ };
+
+ template <class Clock, class Formatter>
+ class wstopclock_accumulator : public basic_stopclock_accumulator<Clock, Formatter> {
+ typedef basic_stopclock_accumulator<Clock, Formatter> base_type;
+ public:
+ typedef Clock clock;
+ typedef stopwatch_accumulator<Clock> stopwatch;
+ typedef Formatter formatter;
+ typedef typename Formatter::string_type string_type;
+ typedef typename Formatter::char_type char_type;
+ typedef typename Formatter::ostream_type ostream_type;
+
+ explicit wstopclock_accumulator( system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(ec) { }
+ explicit wstopclock_accumulator( ostream_type & os,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, ec) { }
+
+ explicit wstopclock_accumulator( const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(format, ec) { }
+
+ explicit wstopclock_accumulator( int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(places, ec) { }
+
+ wstopclock_accumulator( ostream_type & os, const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, format, ec) { }
+
+ wstopclock_accumulator( const string_type & format, int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(format, places, ec) { }
+
+ wstopclock_accumulator( ostream_type & os, int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, places, ec) { }
+
+ wstopclock_accumulator( int places, const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(places, format, ec) { }
+
+ wstopclock_accumulator( ostream_type & os, const string_type & format, int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, format, places, ec) { }
+
+ wstopclock_accumulator( ostream_type & os, int places, const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, places, format, ec) { }
+
+
+ typedef stopwatch_runner<wstopclock_accumulator> scoped_run;
+ typedef stopwatch_stopper<wstopclock_accumulator> scoped_stop;
+ typedef stopwatch_suspender<wstopclock_accumulator> scoped_suspend;
+ typedef stopwatch_resumer<wstopclock_accumulator> scoped_resume;
+ };
+
+ typedef wstopclock_accumulator< boost::chrono::system_clock > system_wstopclock_accumulator;
+ #ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
+ typedef wstopclock_accumulator< boost::chrono::steady_clock > steady_wstopclock_accumulator;
+ #endif
+ typedef wstopclock_accumulator< boost::chrono::high_resolution_clock > high_resolution_wstopclock_accumulator;
+ typedef wstopclock_accumulator< boost::chrono::process_real_cpu_clock > process_real_cpu_wstopclock_accumulator;
+ typedef wstopclock_accumulator< boost::chrono::process_user_cpu_clock > process_user_cpu_wstopclock_accumulator;
+ typedef wstopclock_accumulator< boost::chrono::process_system_cpu_clock > process_system_cpu_wstopclock_accumulator;
+ typedef wstopclock_accumulator< boost::chrono::process_cpu_clock > process_cpu_wstopclock_accumulator;
+
+
+ } // namespace chrono
+} // namespace boost
+
+#endif // BOOST_STOPWATCHES_STOPCLOCK_HPP

Added: sandbox/stopwatches/boost/chrono/stopwatches/stopwatch.hpp
==============================================================================
--- (empty file)
+++ sandbox/stopwatches/boost/chrono/stopwatches/stopwatch.hpp 2011-09-11 08:43:58 EDT (Sun, 11 Sep 2011)
@@ -0,0 +1,70 @@
+// boost/chrono/stopwatches/stopwatch.hpp ------------------------------------------------------------//
+// Copyright 2009-2011 Vicente J. Botet Escriba
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+// See http://www.boost.org/libs/chrono/stopwatches for documentation.
+
+#ifndef BOOST_STOPWATCHES_STOPWATCH_HPP
+#define BOOST_STOPWATCHES_STOPWATCH_HPP
+
+#include <utility>
+#include <boost/chrono/chrono.hpp>
+#include <boost/chrono/stopwatches/stopwatch_scoped.hpp>
+#include <boost/chrono/stopwatches/lightweight_stopwatch.hpp>
+#include <boost/system/error_code.hpp>
+#include <boost/utility/base_from_member.hpp>
+
+namespace boost
+{
+ namespace chrono
+ {
+
+//--------------------------------------------------------------------------------------//
+// stopwatch
+//
+//~ A stopwatch is a class designed to measure the amount of time elapsed from a particular time
+//~ when activated to when it is deactivated.
+
+//~ Calling start starts the timer running, and calling stop stops it.
+//~ A call to reset resets the stopwatch to zero.
+//~ A stopwatch can also also used to record split times or lap times.
+//~ The elapsed time since the last start is available through the elapsed function.
+//--------------------------------------------------------------------------------------//
+
+ //~ template <class Clock=chrono::high_resolution_clock>
+ template <class Clock=chrono::system_clock>
+ class stopwatch;
+
+ //~ struct dont_start_t{};
+ //~ static const dont_start_t dont_start = {};
+//--------------------------------------------------------------------------------------//
+
+ template <class Clock>
+ class stopwatch : private base_from_member<typename Clock::duration>, public lightweight_stopwatch<Clock>
+ {
+ public:
+ typedef base_from_member<typename Clock::duration> pbase_type;
+ explicit stopwatch( system::error_code & ec = BOOST_CHRONO_THROWS )
+ : pbase_type(), lightweight_stopwatch<Clock>(pbase_type::member, ec)
+ {
+ }
+
+ explicit stopwatch( const dont_start_t& t )
+ : pbase_type(), lightweight_stopwatch<Clock>(pbase_type::member, t)
+ { }
+
+ };
+
+//--------------------------------------------------------------------------------------//
+ typedef boost::chrono::stopwatch< boost::chrono::system_clock > system_stopwatch;
+#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
+ typedef boost::chrono::stopwatch< boost::chrono::steady_clock > steady_stopwatch;
+#endif
+ typedef boost::chrono::stopwatch< boost::chrono::high_resolution_clock > high_resolution_stopwatch;
+
+
+
+ } // namespace chrono
+} // namespace boost
+
+#endif

Added: sandbox/stopwatches/boost/chrono/stopwatches/stopwatch_accumulator.hpp
==============================================================================
--- (empty file)
+++ sandbox/stopwatches/boost/chrono/stopwatches/stopwatch_accumulator.hpp 2011-09-11 08:43:58 EDT (Sun, 11 Sep 2011)
@@ -0,0 +1,80 @@
+// boost/chrono/stopwatches/stopwatch_accumulator.hpp ------------------------------------------------------------//
+// Copyright 2009-2011 Vicente J. Botet Escriba
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+// See http://www.boost.org/libs/chrono/stopwatches for documentation.
+
+#ifndef BOOST_STOPWATCHES_STOPWATCH_ACCUMULATOR_HPP
+#define BOOST_STOPWATCHES_STOPWATCH_ACCUMULATOR_HPP
+
+#include <utility>
+
+#include <boost/chrono/chrono.hpp>
+#include <boost/chrono/stopwatches/stopwatch_scoped.hpp>
+#include <boost/system/error_code.hpp>
+#include <boost/chrono/stopwatches/lightweight_stopwatch.hpp>
+#include <boost/utility/base_from_member.hpp>
+
+namespace boost
+{
+ namespace chrono
+ {
+
+//--------------------------------------------------------------------------------------//
+// stopwatch
+//
+//~ A stopwatch accumulator is a class designed to measure the amount of time elapsed from a particular time
+//~ when activated to when it is deactivated.
+
+//~ Calling start starts the timer running, and calling stop stops it.
+//~ A call to reset resets the stopwatch to zero.
+//~ A stopwatch can also be used to record split times or lap times.
+//~ The elapsed time since the last start is available through the elapsed function.
+//--------------------------------------------------------------------------------------//
+
+ // forward declaration
+ template <class Clock=chrono::high_resolution_clock,
+ typename Features=accumulators::features<
+ accumulators::tag::count,
+ accumulators::tag::sum,
+ accumulators::tag::min,
+ accumulators::tag::max,
+ accumulators::tag::mean >,
+ typename Weight=void
+ >
+ class stopwatch_accumulator;
+
+
+//--------------------------------------------------------------------------------------//
+
+ template <class Clock, typename Features, typename Weight>
+ class stopwatch_accumulator
+ : private base_from_member<
+ typename accumulators::accumulator_set<typename Clock::duration::rep, Features, Weight>
+ //~ typename lightweight_stopwatch_accumulator_set_traits<Features,Weight>::template apply<Clock::duration>::storage_type
+ >,
+ public lightweight_stopwatch<Clock,lightweight_stopwatch_accumulator_set_traits<Features,Weight> >
+ {
+ public:
+ typedef base_from_member<typename accumulators::accumulator_set<typename Clock::duration::rep, Features, Weight> > pbase_type;
+
+ stopwatch_accumulator( )
+ : pbase_type(),
+ lightweight_stopwatch<Clock,lightweight_stopwatch_accumulator_set_traits<Features,Weight> >(pbase_type::member, dont_start)
+ { }
+ };
+
+//--------------------------------------------------------------------------------------//
+ typedef boost::chrono::stopwatch_accumulator< boost::chrono::system_clock > system_stopwatch_accumulator;
+#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
+ typedef boost::chrono::stopwatch_accumulator< boost::chrono::steady_clock > steady_stopwatch_accumulator;
+#endif
+ typedef boost::chrono::stopwatch_accumulator< boost::chrono::high_resolution_clock > high_resolution_stopwatch_accumulator;
+
+//--------------------------------------------------------------------------------------//
+
+
+ } // namespace chrono
+} // namespace boost
+
+#endif

Added: sandbox/stopwatches/boost/chrono/stopwatches/stopwatch_accumulator_formatter.hpp
==============================================================================
--- (empty file)
+++ sandbox/stopwatches/boost/chrono/stopwatches/stopwatch_accumulator_formatter.hpp 2011-09-11 08:43:58 EDT (Sun, 11 Sep 2011)
@@ -0,0 +1,167 @@
+// boost/chrono/stopwatches/stopwatch_accumulator_formatter.hpp ------------------------------------------------------------//
+// Copyright 2009-2011 Vicente J. Botet Escriba
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+// See http://www.boost.org/libs/chrono/stopwatches for documentation.
+
+#ifndef BOOST_STOPWATCHES_STOPWATCH_ACCUMULATOR_FORMATTER_HPP
+#define BOOST_STOPWATCHES_STOPWATCH_ACCUMULATOR_FORMATTER_HPP
+
+#include <boost/chrono/chrono.hpp>
+#include <boost/system/error_code.hpp>
+#include <boost/current_function.hpp>
+#include <boost/chrono/stopwatches/detail/default_out.hpp>
+#include <boost/chrono/stopwatches/detail/adaptive_string.hpp>
+#include <boost/accumulators/accumulators.hpp>
+#include <boost/accumulators/statistics.hpp>
+#include <boost/accumulators/framework/accumulator_set.hpp>
+#include <boost/accumulators/statistics/sum.hpp>
+#include <boost/accumulators/statistics/min.hpp>
+#include <boost/accumulators/statistics/max.hpp>
+#include <boost/accumulators/statistics/mean.hpp>
+#include <boost/cstdint.hpp>
+#include <boost/assert.hpp>
+#include <string>
+#include <iostream>
+#include <boost/io/ios_state.hpp>
+#include <cstring>
+#include <cassert>
+
+#define BOOST_STOPWATCHES_ACCUMULATOR_FORMAT_DEFAULT "%c times, sum=%ss, min=%ms, max=%Ms, mean=%as, frequency=%fHz, lifetime=%ls, percentage=%p%\n"
+
+
+namespace boost { namespace chrono {
+
+//--------------------------------------------------------------------------------------//
+//--------------------------------------------------------------------------------------//
+
+ template <
+ typename CharT=char,
+ typename Traits=std::char_traits<CharT>,
+ class Alloc=std::allocator<CharT>
+ >
+ class basic_stopwatch_accumulator_formatter {
+ public:
+ typedef std::basic_string<CharT,Traits,Alloc> string_type;
+ typedef CharT char_type;
+ typedef std::basic_ostream<CharT,Traits> ostream_type;
+
+ static ostream_type & default_os();
+ static const char_type* default_format();
+ static string_type format(const char_type* s) {
+ string_type res(s);
+ res += boost::chrono::detail::adaptive_string(" : ");
+ res += default_format();
+ return res;
+ }
+ static int default_places() { return 3; }
+
+ template <class Stopwatch >
+ static void show_time( Stopwatch & stopwatch_, const char_type* format, int places, ostream_type & os, system::error_code & ec)
+ // NOTE WELL: Will truncate least-significant digits to LDBL_DIG, which may
+ // be as low as 10, although will be 15 for many common platforms.
+ {
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ ec.clear();
+ }
+ typedef typename Stopwatch::storage_type accumulator;
+ typedef typename Stopwatch::duration duration_t;
+ accumulator& acc = stopwatch_.get_storage();
+ duration_t lt= stopwatch_.lifetime(ec);
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return;
+ }
+ //if ( d < duration_t::zero() ) return;
+ if ( places > 9 )
+ places = 9; // sanity check
+ else if ( places < 0 )
+ places = 0;
+
+ boost::io::ios_flags_saver ifs( os );
+ os.setf( std::ios_base::fixed, std::ios_base::floatfield );
+ boost::io::ios_precision_saver ips( os );
+ os.precision( places );
+
+ for ( ; *format; ++format ) {
+ if ( (*format != '%') || (!*(format+1)) || (!std::strchr("acflmMps", *(format+1))) ) {
+ os << *format;
+ } else {
+ ++format;
+ switch ( *format ) {
+ case 's':
+ os << boost::chrono::duration<double>(duration_t(accumulators::sum(acc))).count();
+ break;
+ case 'm':
+ os << boost::chrono::duration<double>(duration_t((accumulators::min)(acc))).count();
+ break;
+ case 'M':
+ os << boost::chrono::duration<double>(duration_t((accumulators::max)(acc))).count();
+ break;
+ case 'a':
+ os << ((accumulators::count(acc)>0)
+ //? boost::chrono::duration<double>(duration_t(typename duration_t::rep(accumulators::mean(acc)))).count()
+ ? boost::chrono::duration<double>(duration_t(accumulators::sum(acc))).count() / accumulators::count(acc)
+ : 0);
+ break;
+ case 'c':
+ os << accumulators::count(acc);
+ break;
+ case 'f':
+ os << ((accumulators::count(acc)>0)
+ ? accumulators::count(acc)/boost::chrono::duration<double>(lt)
+ : 0);
+ break;
+ case 'l':
+ os << boost::chrono::duration<double>(lt).count();
+ break;
+ case 'p':
+ os << int(boost::chrono::duration<double>(duration_t(accumulators::sum(acc))).count()*100/boost::chrono::duration<double>(lt).count());
+ break;
+ default:
+ BOOST_ASSERT(0 && "basic_stopwatch_accumulator_formatter internal logic error");
+ }
+ }
+ }
+ }
+ };
+
+namespace detail {
+ template <typename CharT>
+ struct basic_stopwatch_accumulator_formatter_default_format;
+ template <>
+ struct basic_stopwatch_accumulator_formatter_default_format<char> {
+ static const char* apply() {return BOOST_STOPWATCHES_ACCUMULATOR_FORMAT_DEFAULT; }
+ };
+#ifndef BOOST_NO_STD_WSTRING
+ template <>
+ struct basic_stopwatch_accumulator_formatter_default_format<wchar_t> {
+ static const wchar_t* apply() {return L"%c times, sum=%ss, min=%ms, max=%Ms, mean=%as, frequency=%fHz, lifetime=%ls, percentage=%p%\n"; }
+ };
+
+#endif
+}
+
+ template <typename CharT,typename Traits, class Alloc>
+ const typename basic_stopwatch_accumulator_formatter<CharT,Traits,Alloc>::char_type*
+ basic_stopwatch_accumulator_formatter<CharT,Traits,Alloc>::default_format() {
+ return detail::basic_stopwatch_accumulator_formatter_default_format<CharT>::apply();
+ }
+
+ template <typename CharT,typename Traits, class Alloc>
+ typename basic_stopwatch_accumulator_formatter<CharT,Traits,Alloc>::ostream_type &
+ basic_stopwatch_accumulator_formatter<CharT,Traits,Alloc>::default_os() { return detail::default_out<CharT,Traits>::apply(); }
+
+ typedef basic_stopwatch_accumulator_formatter<char> stopwatch_accumulator_formatter;
+ typedef basic_stopwatch_accumulator_formatter<wchar_t> wstopwatch_accumulator_formatter;
+
+} // namespace chrono
+} // namespace boost
+
+#define BOOST_STOPWATCHES_ACCUMULATOR_FORMAT(F) boost::chrono::detail::adaptive_string(F " : " BOOST_STOPWATCHES_ACCUMULATOR_FORMAT_DEFAULT)
+#ifdef __GNUC__
+#define BOOST_STOPWATCHES_ACCUMULATOR_FUNCTION_FORMAT boost::chrono::stopwatch_accumulator_formatter::format(BOOST_CURRENT_FUNCTION)
+#else
+#define BOOST_STOPWATCHES_ACCUMULATOR_FUNCTION_FORMAT BOOST_STOPWATCHES_ACCUMULATOR_FORMAT(BOOST_CURRENT_FUNCTION)
+#endif
+
+#endif

Added: sandbox/stopwatches/boost/chrono/stopwatches/stopwatch_accumulator_time_formatter.hpp
==============================================================================
--- (empty file)
+++ sandbox/stopwatches/boost/chrono/stopwatches/stopwatch_accumulator_time_formatter.hpp 2011-09-11 08:43:58 EDT (Sun, 11 Sep 2011)
@@ -0,0 +1,199 @@
+// boost/chrono/stopwatches/stopwatch_accumulator_time_formatter.hpp ------------------------------------------------------------//
+// Copyright 2009-2011 Vicente J. Botet Escriba
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+// See http://www.boost.org/libs/chrono/stopwatches for documentation.
+
+#ifndef BOOST_STOPWATCHES_STOPWATCH_ACCUMULATOR_TIMES_FORMATTER_HPP
+#define BOOST_STOPWATCHES_STOPWATCH_ACCUMULATOR_TIMES_FORMATTER_HPP
+
+#include <boost/chrono/chrono.hpp>
+#include <boost/system/error_code.hpp>
+#include <boost/current_function.hpp>
+#include <boost/chrono/stopwatches/detail/default_out.hpp>
+#include <boost/chrono/stopwatches/detail/adaptive_string.hpp>
+#include <boost/accumulators/accumulators.hpp>
+#include <boost/accumulators/statistics.hpp>
+#include <boost/accumulators/framework/accumulator_set.hpp>
+#include <boost/accumulators/statistics/sum.hpp>
+#include <boost/accumulators/statistics/min.hpp>
+#include <boost/accumulators/statistics/max.hpp>
+#include <boost/accumulators/statistics/mean.hpp>
+#include <boost/cstdint.hpp>
+#include <boost/assert.hpp>
+#include <string>
+#include <iostream>
+#include <boost/io/ios_state.hpp>
+#include <cstring>
+#include <cassert>
+#include <boost/chrono/stopwatches/time_formatter.hpp>
+
+//~ #define BOOST_STOPWATCHES_ACCUMULATOR_TIME_FORMAT_DEFAULT "%c times, sum=%s, min=%m, max=%M, mean=%a, frequency=%fHz, lifetime=%ls, percentage=%p%|real %rs, cpu %cs (%p%), user %us, system %ss\n"
+#define BOOST_STOPWATCHES_ACCUMULATOR_TIME_FORMAT_DEFAULT "%c times, sum %s, min %m, max %M, mean=%a, frequency=%fHz, lifetime=%ls, percentage=%p%\n"
+
+
+namespace boost { namespace chrono {
+
+//--------------------------------------------------------------------------------------//
+//--------------------------------------------------------------------------------------//
+
+ template <
+ typename CharT=char,
+ typename Traits=std::char_traits<CharT>,
+ class Alloc=std::allocator<CharT>
+ >
+ class basic_stopwatch_accumulator_time_formatter {
+ public:
+ typedef std::basic_string<CharT,Traits,Alloc> string_type;
+ typedef CharT char_type;
+ typedef std::basic_ostream<CharT,Traits> ostream_type;
+
+ static ostream_type & default_os();
+ static const char_type* default_format();
+ static string_type format(const char_type* s) {
+ string_type res(s);
+ res += boost::chrono::detail::adaptive_string(" : ");
+ res += default_format();
+ return res;
+ }
+ static int default_places() { return 3; }
+
+ template <class Stopwatch >
+ static void show_time( Stopwatch & stopwatch_, const char_type* format, int places, ostream_type & os, system::error_code & ec)
+ // NOTE WELL: Will truncate least-significant digits to LDBL_DIG, which may
+ // be as low as 10, although will be 15 for many common platforms.
+ {
+ if (!BOOST_CHRONO_IS_THROWS(ec))
+ ec.clear();
+ typedef typename Stopwatch::storage_type accumulator;
+ typedef typename Stopwatch::duration duration_t;
+ accumulator& acc = stopwatch_.get_storage();
+ duration_t lt= stopwatch_.lifetime();
+
+ //if ( d < duration_t::zero() ) return;
+ if ( places > 9 )
+ places = 9; // sanity check
+ else if ( places < 0 )
+ places = 0;
+
+ boost::io::ios_flags_saver ifs( os );
+ os.setf( std::ios_base::fixed, std::ios_base::floatfield );
+ boost::io::ios_precision_saver ips( os );
+ os.precision( places );
+
+ const char_type* format2=BOOST_STOPWATCHES_TIME_FORMAT_DEFAULT;
+ //~ for (format2=format ; *format2; ++format2 ) {
+ //~ if (*format2=='|') {++format2; break;}
+ //~ }
+
+ for ( ; *format; ++format ) {
+ if ( (*format != '%') || (!*(format+1)) || (!std::strchr("acflmMps", *(format+1))) ) {
+ os << *format;
+ } else {
+ ++format;
+ switch ( *format ) {
+ case 's':
+ //~ os << boost::chrono::duration<double>(duration_t(accumulators::sum(acc))).count();
+ time_formatter::show_time<chrono::process_cpu_clock>(accumulators::sum(acc), format2, places, os, ec);
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return;
+ }
+ //~ os << accumulators::sum(acc);
+ break;
+ case 'm':
+ //~ os << boost::chrono::duration<double>(duration_t((accumulators::min)(acc))).count();
+ time_formatter::show_time<chrono::process_cpu_clock>((accumulators::min)(acc), format2, places, os, ec);
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return;
+ }
+ //~ os << (accumulators::min)(acc);
+ break;
+ case 'M':
+ //~ os << boost::chrono::duration<double>(duration_t((accumulators::max)(acc))).count();
+ time_formatter::show_time<chrono::process_cpu_clock>((accumulators::max)(acc), format2, places, os, ec);
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return;
+ }
+ //~ os << (accumulators::max)(acc);
+ break;
+ case 'a':
+ if (accumulators::count(acc)>0) {
+ //? os << boost::chrono::duration<double>(duration_t(typename duration_t::rep(accumulators::mean(acc)))).count()
+ //~ os << boost::chrono::duration<double>(duration_t(accumulators::sum(acc))).count() / accumulators::count(acc)
+ time_formatter::show_time<chrono::process_cpu_clock>(accumulators::sum(acc) / accumulators::count(acc), format2, places, os, ec);
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return;
+ }
+ } else {
+ os << 0;
+ }
+ break;
+ case 'c':
+ os << accumulators::count(acc);
+ break;
+ case 'f':
+ if (accumulators::count(acc)>0)
+ //~ os << accumulators::count(acc)/boost::chrono::duration<double>(lt);
+ os << accumulators::count(acc) << "/" << lt.count();
+ else
+ os << 0;
+ break;
+ case 'l':
+ os << lt.count();
+ break;
+ case 'p':
+ //~ os << int(boost::chrono::duration<double>(duration_t(accumulators::sum(acc))).count()*100/boost::chrono::duration<double>(lt).count());
+ os << accumulators::sum(acc)*100 << "/" << lt.count();
+ break;
+ default:
+ BOOST_ASSERT(0 && "basic_stopwatch_accumulator_time_formatter internal logic error");
+ }
+ }
+ }
+ }
+ };
+
+namespace detail {
+ template <typename CharT>
+ struct basic_stopwatch_accumulator_time_formatter_default_format;
+ template <>
+ struct basic_stopwatch_accumulator_time_formatter_default_format<char> {
+ static const char* apply() {return BOOST_STOPWATCHES_ACCUMULATOR_TIME_FORMAT_DEFAULT; }
+ };
+#ifndef BOOST_NO_STD_WSTRING
+ template <>
+ struct basic_stopwatch_accumulator_time_formatter_default_format<wchar_t> {
+ //~ static const wchar_t* apply() {return L"%c times, sum=%ss, min=%ms, max=%Ms, mean=%as, frequency=%fHz, lifetime=%ls, percentage=%p%|real %rs, cpu %cs (%p%), user %us, system %ss\n"; }
+ static const wchar_t* apply() {return L"%c times, sum %s, min %m, max %M, mean %a, frequency=%fHz, lifetime=%ls, percentage=%p%\n"; }
+ };
+
+#endif
+}
+
+ template <typename CharT,typename Traits, class Alloc>
+ const typename basic_stopwatch_accumulator_time_formatter<CharT,Traits,Alloc>::char_type*
+ basic_stopwatch_accumulator_time_formatter<CharT,Traits,Alloc>::default_format() {
+ return detail::basic_stopwatch_accumulator_time_formatter_default_format<CharT>::apply();
+ }
+
+ template <typename CharT,typename Traits, class Alloc>
+ typename basic_stopwatch_accumulator_time_formatter<CharT,Traits,Alloc>::ostream_type &
+ basic_stopwatch_accumulator_time_formatter<CharT,Traits,Alloc>::default_os() { return detail::default_out<CharT,Traits>::apply(); }
+
+ typedef basic_stopwatch_accumulator_time_formatter<char> stopwatch_accumulator_time_formatter;
+ typedef basic_stopwatch_accumulator_time_formatter<wchar_t> wstopwatch_accumulator_time_formatter;
+
+
+
+
+} // namespace chrono
+} // namespace boost
+
+#define BOOST_STOPWATCHES_ACCUMULATOR_TIME_FORMAT(F) boost::chrono::detail::adaptive_string(F " : " BOOST_STOPWATCHES_ACCUMULATOR_TIME_FORMAT_DEFAULT)
+#ifdef __GNUC__
+#define BOOST_STOPWATCHES_ACCUMULATOR_TIME_FUNCTION_FORMAT boost::chrono::stopwatch_accumulator_time_formatter::format(BOOST_CURRENT_FUNCTION)
+#else
+#define BOOST_STOPWATCHES_ACCUMULATOR_TIME_FUNCTION_FORMAT BOOST_STOPWATCHES_ACCUMULATOR_TIME_FORMAT(BOOST_CURRENT_FUNCTION)
+#endif
+
+#endif

Added: sandbox/stopwatches/boost/chrono/stopwatches/stopwatch_formatter.hpp
==============================================================================
--- (empty file)
+++ sandbox/stopwatches/boost/chrono/stopwatches/stopwatch_formatter.hpp 2011-09-11 08:43:58 EDT (Sun, 11 Sep 2011)
@@ -0,0 +1,130 @@
+// boost/chrono/stopwatches/stopwatch_formatter.hpp ------------------------------------------------------------//
+// Copyright 2009-2011 Vicente J. Botet Escriba
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+// See http://www.boost.org/libs/chrono/stopwatches for documentation.
+
+#ifndef BOOST_STOPWATCHES_STOPWATCH_FORMATTER_HPP
+#define BOOST_STOPWATCHES_STOPWATCH_FORMATTER_HPP
+
+#include <boost/chrono/chrono.hpp>
+#include <boost/system/error_code.hpp>
+#include <boost/current_function.hpp>
+#include <boost/chrono/stopwatches/detail/default_out.hpp>
+#include <boost/chrono/stopwatches/detail/adaptive_string.hpp>
+#include <boost/cstdint.hpp>
+#include <string>
+#include <iostream>
+#include <boost/io/ios_state.hpp>
+#include <cstring>
+#include <cassert>
+#include <boost/assert.hpp>
+
+#define BOOST_STOPWATCHES_STOPWATCH_FORMAT_DEFAULT "%ds\n"
+
+namespace boost { namespace chrono {
+
+//--------------------------------------------------------------------------------------//
+//--------------------------------------------------------------------------------------//
+
+
+ template <
+ typename CharT=char,
+ typename Traits=std::char_traits<CharT>,
+ class Alloc=std::allocator<CharT>
+ >
+ class basic_stopwatch_formatter {
+ public:
+ typedef std::basic_string<CharT,Traits,Alloc> string_type;
+ typedef CharT char_type;
+ typedef std::basic_ostream<CharT,Traits> ostream_type;
+
+ static ostream_type & default_os();
+ static const char_type* default_format();
+ static string_type format(const char_type* s) {
+ string_type res(s);
+ //res += boost::chrono::detail::adaptive_string(" tokes %ds\n");
+ res += boost::chrono::detail::adaptive_string(" : ");
+ res += default_format();
+ return res;
+ }
+ static int default_places() { return 3; }
+
+ template <class Stopwatch >
+ static void show_time( Stopwatch & stopwatch_, const char_type* format, int places, ostream_type & os, system::error_code & ec)
+ // NOTE WELL: Will truncate least-significant digits to LDBL_DIG, which may
+ // be as low as 10, although will be 15 for many common platforms.
+ {
+ typedef typename Stopwatch::duration duration_t;
+ duration_t d = stopwatch_.elapsed( ec );
+
+ if ( d < duration_t::zero() ) return;
+ if ( places > 9 )
+ places = 9; // sanity check
+ else if ( places < 0 )
+ places = 0;
+
+ boost::io::ios_flags_saver ifs( os );
+ os.setf( std::ios_base::fixed, std::ios_base::floatfield );
+ boost::io::ios_precision_saver ips( os );
+ os.precision( places );
+
+ for ( ; *format; ++format ) {
+ if ( (*format != '%') || (!*(format+1)) || (!std::strchr("d", *(format+1))) ) {
+ os << *format;
+ } else {
+ ++format;
+ switch ( *format ) {
+ case 'd':
+ os << boost::chrono::duration<double>(d).count();
+ break;
+ default:
+ BOOST_ASSERT(0 && "run_timer internal logic error");
+ }
+ }
+ }
+ }
+ };
+
+namespace detail {
+ template <typename CharT>
+ struct basic_stopwatch_formatter_default_format;
+ template <>
+ struct basic_stopwatch_formatter_default_format<char> {
+ static const char* apply() {return BOOST_STOPWATCHES_STOPWATCH_FORMAT_DEFAULT; }
+ };
+#ifndef BOOST_NO_STD_WSTRING
+ template <>
+ struct basic_stopwatch_formatter_default_format<wchar_t> {
+ static const wchar_t* apply() {return L"%ds\n"; }
+ };
+
+#endif
+}
+
+ template <typename CharT,typename Traits, class Alloc>
+ const typename basic_stopwatch_formatter<CharT,Traits,Alloc>::char_type*
+ basic_stopwatch_formatter<CharT,Traits,Alloc>::default_format() {
+ return detail::basic_stopwatch_formatter_default_format<CharT>::apply();
+ }
+
+ template <typename CharT,typename Traits, class Alloc>
+ typename basic_stopwatch_formatter<CharT,Traits,Alloc>::ostream_type &
+ basic_stopwatch_formatter<CharT,Traits,Alloc>::default_os() {
+ return detail::default_out<CharT,Traits>::apply();
+ }
+
+ typedef basic_stopwatch_formatter<char> stopwatch_formatter;
+ typedef basic_stopwatch_formatter<wchar_t> wstopwatch_formatter;
+
+ } // namespace chrono
+} // namespace boost
+
+#define BOOST_STOPWATCHES_STOPWATCH_FORMAT(F) boost::chrono::detail::adaptive_string(F " : " BOOST_STOPWATCHES_STOPWATCH_FORMAT_DEFAULT)
+#ifdef __GNUC__
+#define BOOST_STOPWATCHES_STOPWATCH_FUNCTION_FORMAT boost::chrono::stopwatch_formatter::format(BOOST_CURRENT_FUNCTION)
+#else
+#define BOOST_STOPWATCHES_STOPWATCH_FUNCTION_FORMAT BOOST_STOPWATCHES_STOPWATCH_FORMAT(BOOST_CURRENT_FUNCTION)
+#endif
+
+#endif

Added: sandbox/stopwatches/boost/chrono/stopwatches/stopwatch_reporter.hpp
==============================================================================
--- (empty file)
+++ sandbox/stopwatches/boost/chrono/stopwatches/stopwatch_reporter.hpp 2011-09-11 08:43:58 EDT (Sun, 11 Sep 2011)
@@ -0,0 +1,352 @@
+// boost/chrono/stopwatches/stopwatch_reporter.hpp ------------------------------------------------------------//
+// Copyright 2009-2011 Vicente J. Botet Escriba
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+// See http://www.boost.org/libs/chrono/stopwatches for documentation.
+
+#ifndef BOOST_STOPWATCHES_STOPWATCH_REPORTER_HPP
+#define BOOST_STOPWATCHES_STOPWATCH_REPORTER_HPP
+
+#if !defined(BOOST_ENABLE_WARNINGS) && !defined(BOOST_STOPWATCHES_ENABLE_WARNINGS)
+#if defined __GNUC__
+#pragma GCC system_header
+#elif defined __SUNPRO_CC
+#pragma disable_warn
+#elif defined _MSC_VER
+#pragma warning(push, 1)
+#endif
+#endif
+
+#include <boost/chrono/chrono.hpp>
+#include <boost/chrono/stopwatches/stopwatch_scoped.hpp>
+#include <boost/system/error_code.hpp>
+#include <boost/chrono/stopwatches/clock_suspender.hpp>
+#include <boost/cstdint.hpp>
+#include <string>
+#include <iostream>
+#include <boost/io/ios_state.hpp>
+#include <cstring>
+#include <cassert>
+
+#include <boost/config/abi_prefix.hpp> // must be the last #include
+
+namespace boost { namespace chrono {
+
+//--------------------------------------------------------------------------------------//
+//~ provides a everything a Timer provides and it adds reporting capabilities that can be invoked in a single line of code. The reporting is controleed by two parameters:
+
+ //~ * format : The output format
+ //~ * places(precission): the number of decimal placess used.
+
+//~ The default places is given by default_places and is 3. The default format is "\n%ts\n", where
+
+ //~ * %t : the result of elapsed() when the reporting is done.
+
+//~ The time is given using the suffix "s" following the System International d'Unites Std.
+
+/* void f1()
+ * {
+ * stopwatch_reporter<stopwatch<> > _;
+ * // ...
+ * }
+ */
+/* void f2()
+ * {
+ * stopwatch<>::reporter _;
+ * // ...
+ * }
+ */
+/* void f3()
+ * {
+ * static stopwatch_reporter<stopwatch_accumulator<> > t;
+ * stopwatch_reporter<stopwatch_accumulator<> >::scoped_run _(t);
+ * // ...
+ * }
+ */
+/* void f4()
+ * {
+ * static stopwatch_accumulator<>::reporter t;
+ * stopwatch_accumulator<>::reporter::scoped_run _(t);
+ * // ...
+ * }
+ */
+//--------------------------------------------------------------------------------------//
+
+ template <class Stopwatch, class Formatter>
+ class basic_stopwatch_reporter : public Stopwatch {
+ public:
+ typedef typename Stopwatch::clock clock;
+ typedef Stopwatch stopwatch;
+ typedef Formatter formatter;
+ typedef typename Formatter::string_type string_type;
+ typedef typename Formatter::char_type char_type;
+ typedef typename Formatter::ostream_type ostream_type;
+
+ basic_stopwatch_reporter( )
+ : m_places(Formatter::default_places()), m_os(Formatter::default_os()), m_format(Formatter::default_format()), m_reported(false) {
+ }
+ explicit basic_stopwatch_reporter( system::error_code & )
+ : m_places(Formatter::default_places()), m_os(Formatter::default_os()), m_format(Formatter::default_format()), m_reported(false) {
+ }
+ explicit basic_stopwatch_reporter( ostream_type & os,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : m_places(Formatter::default_places()), m_os(os), m_format(Formatter::default_format()), m_reported(false) {
+ if (!BOOST_CHRONO_IS_THROWS(ec)) ec.clear();
+ }
+
+ explicit basic_stopwatch_reporter( const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : m_places(Formatter::default_places()), m_os(Formatter::default_os()), m_format(format), m_reported(false) {
+ if (!BOOST_CHRONO_IS_THROWS(ec)) ec.clear();
+ }
+
+ explicit basic_stopwatch_reporter( int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : m_places(places), m_os(Formatter::default_os()), m_format(Formatter::default_format()), m_reported(false) {
+ if (!BOOST_CHRONO_IS_THROWS(ec)) ec.clear();
+ }
+
+ basic_stopwatch_reporter( ostream_type & os, const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : m_places(Formatter::default_places()), m_os(os), m_format(format), m_reported(false) {
+ if (!BOOST_CHRONO_IS_THROWS(ec)) ec.clear();
+ }
+
+ basic_stopwatch_reporter( const string_type & format, int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : m_places(places), m_os(Formatter::default_os()), m_format(format), m_reported(false) {
+ if (!BOOST_CHRONO_IS_THROWS(ec)) ec.clear();
+ }
+
+ basic_stopwatch_reporter( ostream_type & os, int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : m_places(places), m_os(os), m_format(Formatter::default_format()), m_reported(false) {
+ if (!BOOST_CHRONO_IS_THROWS(ec)) ec.clear();
+ }
+
+ basic_stopwatch_reporter( int places, const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : m_places(places), m_os(Formatter::default_os()), m_format(format), m_reported(false) {
+ if (!BOOST_CHRONO_IS_THROWS(ec)) ec.clear();
+ }
+
+ basic_stopwatch_reporter( ostream_type & os, const string_type & format, int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : m_places(places), m_os(os), m_format(format), m_reported(false) {
+ if (!BOOST_CHRONO_IS_THROWS(ec)) ec.clear();
+ }
+
+ basic_stopwatch_reporter( ostream_type & os, int places, const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : m_places(places), m_os(os), m_format(format), m_reported(false) {
+ if (!BOOST_CHRONO_IS_THROWS(ec)) ec.clear();
+ }
+
+ ~basic_stopwatch_reporter() {// never throws
+ system::error_code ec;
+ //this->stop(ec);
+ if ( !reported() ) {
+ this->report( ec );
+ }
+ }
+
+
+ inline void report( system::error_code & /*ec*/ = BOOST_CHRONO_THROWS );
+ bool reported() const { return m_reported; }
+
+
+ typedef stopwatch_runner<basic_stopwatch_reporter<Stopwatch,Formatter> > scoped_run;
+ typedef stopwatch_stopper<basic_stopwatch_reporter<Stopwatch,Formatter> > scoped_stop;
+ typedef stopwatch_suspender<basic_stopwatch_reporter<Stopwatch,Formatter> > scoped_suspend;
+ typedef stopwatch_resumer<basic_stopwatch_reporter<Stopwatch,Formatter> > scoped_resume;
+
+ protected:
+ int m_places;
+ ostream_type & m_os;
+ string_type m_format;
+ bool m_reported;
+
+
+ //basic_stopwatch_reporter(); // = delete;
+ basic_stopwatch_reporter(const basic_stopwatch_reporter&); // = delete;
+ basic_stopwatch_reporter& operator=(const basic_stopwatch_reporter&); // = delete;
+ };
+
+ template <class Stopwatch, class Formatter>
+ void basic_stopwatch_reporter<Stopwatch, Formatter>::report( system::error_code & ec ) {
+ chrono::clock_suspender<typename Stopwatch::clock> _(ec);
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return;
+ }
+ if ( m_format.empty() ) m_format = Formatter::default_format();
+
+ m_reported = true;
+ Formatter::show_time( *this, m_format.c_str(), m_places, m_os, ec);
+ }
+
+
+ template <class Stopwatch>
+ struct stopwatch_reporter_default_formatter;
+
+ template <class Stopwatch, class Formatter=typename stopwatch_reporter_default_formatter<Stopwatch>::type>
+ class stopwatch_reporter;
+
+ template <class Stopwatch, class Formatter>
+ struct stopwatch_reporter_default_formatter<stopwatch_reporter<Stopwatch, Formatter> > {
+ typedef Formatter type;
+ };
+
+
+ template <class Stopwatch, class Formatter>
+ class stopwatch_reporter : public basic_stopwatch_reporter<Stopwatch,Formatter> {
+ typedef basic_stopwatch_reporter<Stopwatch,Formatter> base_type;
+ public:
+ typedef typename Stopwatch::clock clock;
+ typedef Stopwatch stopwatch;
+ typedef Formatter formatter;
+ typedef typename Formatter::string_type string_type;
+ typedef typename Formatter::char_type char_type;
+ typedef typename Formatter::ostream_type ostream_type;
+
+ stopwatch_reporter( )
+ : base_type() { }
+ explicit stopwatch_reporter( system::error_code & ec )
+ : base_type(ec) { }
+ explicit stopwatch_reporter( ostream_type & os,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, ec) { }
+
+ explicit stopwatch_reporter( const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(format, ec) { }
+
+ explicit stopwatch_reporter( int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(places, ec) { }
+
+ stopwatch_reporter( ostream_type & os, const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, format, ec) { }
+
+ stopwatch_reporter( const string_type & format, int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(format, places, ec) { }
+
+ stopwatch_reporter( ostream_type & os, int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, places, ec) { }
+
+ stopwatch_reporter( int places, const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(places, format, ec) { }
+
+ stopwatch_reporter( ostream_type & os, const string_type & format, int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, format, places, ec) { }
+
+ stopwatch_reporter( ostream_type & os, int places, const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, places, format, ec) { }
+
+ typedef stopwatch_runner<stopwatch_reporter<Stopwatch,Formatter> > scoped_run;
+ typedef stopwatch_stopper<stopwatch_reporter<Stopwatch,Formatter> > scoped_stop;
+ typedef stopwatch_suspender<stopwatch_reporter<Stopwatch,Formatter> > scoped_suspend;
+ typedef stopwatch_resumer<stopwatch_reporter<Stopwatch,Formatter> > scoped_resume;
+
+ protected:
+
+
+ //stopwatch_reporter(); // = delete;
+ stopwatch_reporter(const stopwatch_reporter&); // = delete;
+ stopwatch_reporter& operator=(const stopwatch_reporter&); // = delete;
+ };
+
+
+ template <class Stopwatch>
+ struct wstopwatch_reporter_default_formatter;
+
+ template <class Stopwatch, class Formatter=typename wstopwatch_reporter_default_formatter<Stopwatch>::type>
+ class wstopwatch_reporter;
+
+ template <class Stopwatch, class Formatter>
+ struct wstopwatch_reporter_default_formatter<wstopwatch_reporter<Stopwatch, Formatter> > {
+ typedef Formatter type;
+ };
+
+
+ template <class Stopwatch, class Formatter>
+ class wstopwatch_reporter : public basic_stopwatch_reporter<Stopwatch,Formatter> {
+ typedef basic_stopwatch_reporter<Stopwatch,Formatter> base_type;
+ public:
+ typedef typename Stopwatch::clock clock;
+ typedef Stopwatch stopwatch;
+ typedef Formatter formatter;
+ typedef typename Formatter::string_type string_type;
+ typedef typename Formatter::char_type char_type;
+ typedef typename Formatter::ostream_type ostream_type;
+
+ explicit wstopwatch_reporter( system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(ec) { }
+ explicit wstopwatch_reporter( ostream_type & os,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, ec) { }
+
+ explicit wstopwatch_reporter( const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(format, ec) { }
+
+ explicit wstopwatch_reporter( int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(places, ec) { }
+
+ wstopwatch_reporter( ostream_type & os, const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, format, ec) { }
+
+ wstopwatch_reporter( const string_type & format, int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(format, places, ec) { }
+
+ wstopwatch_reporter( ostream_type & os, int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, places, ec) { }
+
+ wstopwatch_reporter( int places, const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(places, format, ec) { }
+
+ wstopwatch_reporter( ostream_type & os, const string_type & format, int places,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, format, places, ec) { }
+
+ wstopwatch_reporter( ostream_type & os, int places, const string_type & format,
+ system::error_code & ec = BOOST_CHRONO_THROWS )
+ : base_type(os, places, format, ec) { }
+
+ typedef stopwatch_runner<wstopwatch_reporter<Stopwatch,Formatter> > scoped_run;
+ typedef stopwatch_stopper<wstopwatch_reporter<Stopwatch,Formatter> > scoped_stop;
+ typedef stopwatch_suspender<wstopwatch_reporter<Stopwatch,Formatter> > scoped_suspend;
+ typedef stopwatch_resumer<wstopwatch_reporter<Stopwatch,Formatter> > scoped_resume;
+
+ protected:
+
+ //wstopwatch_reporter(); // = delete;
+ wstopwatch_reporter(const wstopwatch_reporter&); // = delete;
+ wstopwatch_reporter& operator=(const wstopwatch_reporter&); // = delete;
+ };
+
+ } // namespace chrono
+} // namespace boost
+
+#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
+
+#if !defined(BOOST_ENABLE_WARNINGS) && !defined(BOOST_STOPWATCHES_ENABLE_WARNINGS)
+#if defined __SUNPRO_CC
+#pragma enable_warn
+#elif defined _MSC_VER
+#pragma warning(pop)
+#endif
+#endif
+
+
+#endif

Added: sandbox/stopwatches/boost/chrono/stopwatches/stopwatch_scoped.hpp
==============================================================================
--- (empty file)
+++ sandbox/stopwatches/boost/chrono/stopwatches/stopwatch_scoped.hpp 2011-09-11 08:43:58 EDT (Sun, 11 Sep 2011)
@@ -0,0 +1,112 @@
+// boost/chrono/stopwatches/stopwatch_scoped.hpp ------------------------------------------------------------//
+// Copyright 2009-2011 Vicente J. Botet Escriba
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+// See http://www.boost.org/libs/chrono/stopwatches for documentation.
+
+#ifndef BOOST_STOPWATCHES_STOPWATCH_SCOPED_HPP
+#define BOOST_STOPWATCHES_STOPWATCH_SCOPED_HPP
+
+#include <boost/chrono/chrono.hpp>
+#include <boost/system/error_code.hpp>
+
+namespace boost
+{
+ namespace chrono
+ {
+
+//--------------------------------------------------------------------------------------//
+ template <class Stopwatch> class stopwatch_runner {
+ public:
+ typedef Stopwatch stopwatch;
+ stopwatch_runner(stopwatch & a, system::error_code & ec = BOOST_CHRONO_THROWS)
+ : stopwatch_(a) {
+ stopwatch_.start(ec);
+ }
+ ~stopwatch_runner() {
+ system::error_code ec;
+ stopwatch_.stop(ec);
+ }
+#if 0
+ typename Stopwatch::duration elapsed(system::error_code & ec = BOOST_CHRONO_THROWS)
+ {
+ return stopwatch_.elapsed(ec)-stopwatch_.get_storage();
+ }
+#endif
+ private:
+ stopwatch& stopwatch_;
+ stopwatch_runner();//= delete;
+ stopwatch_runner(const stopwatch_runner&); // = delete;
+ stopwatch_runner& operator=(const stopwatch_runner&); // = delete;
+
+ };
+
+//--------------------------------------------------------------------------------------//
+ template <class Stopwatch> class stopwatch_stopper {
+ public:
+ typedef Stopwatch stopwatch;
+ stopwatch_stopper(stopwatch & a, system::error_code & ec = BOOST_CHRONO_THROWS)
+ : stopwatch_(a) {
+ stopwatch_.stop(ec);
+ }
+ ~stopwatch_stopper() {
+ system::error_code ec;
+ stopwatch_.start(ec);
+ }
+#if 0
+ typename Stopwatch::duration elapsed(system::error_code & ec = BOOST_CHRONO_THROWS)
+ {
+ return stopwatch_.elapsed(ec)-stopwatch_.get_storage();
+ }
+#endif
+ private:
+ stopwatch& stopwatch_;
+ stopwatch_stopper();//= delete;
+ stopwatch_stopper(const stopwatch_stopper&); // = delete;
+ stopwatch_stopper& operator=(const stopwatch_stopper&); // = delete;
+
+ };
+
+//--------------------------------------------------------------------------------------//
+ template <class Stopwatch> class stopwatch_suspender {
+ public:
+ typedef Stopwatch stopwatch;
+ stopwatch_suspender(stopwatch & a, system::error_code & ec = BOOST_CHRONO_THROWS)
+ : stopwatch_(a) {
+ stopwatch_.suspend(ec);
+ }
+ ~stopwatch_suspender() {
+ system::error_code ec;
+ stopwatch_.resume(ec);
+ }
+ private:
+ stopwatch& stopwatch_;
+ stopwatch_suspender(); // = delete;
+ stopwatch_suspender(const stopwatch_suspender&); // = delete;
+ stopwatch_suspender& operator=(const stopwatch_suspender&); // = delete;
+ };
+
+//--------------------------------------------------------------------------------------//
+ template <class Stopwatch> class stopwatch_resumer {
+ public:
+ typedef Stopwatch stopwatch;
+ stopwatch_resumer(stopwatch & a, system::error_code & ec = BOOST_CHRONO_THROWS)
+ : stopwatch_(a) {
+ stopwatch_.resume(ec);
+ }
+ ~stopwatch_resumer() {
+ system::error_code ec;
+ stopwatch_.suspend(ec);
+ }
+ private:
+ stopwatch& stopwatch_;
+ stopwatch_resumer(); // = delete;
+ stopwatch_resumer(const stopwatch_resumer&); // = delete;
+ stopwatch_resumer& operator=(const stopwatch_resumer&); // = delete;
+ };
+
+
+ } // namespace chrono
+} // namespace boost
+
+#endif

Added: sandbox/stopwatches/boost/chrono/stopwatches/stopwatches.hpp
==============================================================================
--- (empty file)
+++ sandbox/stopwatches/boost/chrono/stopwatches/stopwatches.hpp 2011-09-11 08:43:58 EDT (Sun, 11 Sep 2011)
@@ -0,0 +1,32 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Vicente J. Botet Escriba 2011.
+// Distributed under the Boost
+// Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or
+// copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/chrono/stopwatches for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_STOPWATCHES_STOPWATCHES_HPP
+#define BOOST_STOPWATCHES_STOPWATCHES_HPP
+
+//-----------------------------------------------------------------------------
+#include <boost/chrono/stopwatches/scoped_stopclock.hpp>
+#include <boost/chrono/stopwatches/stopclock.hpp>
+#include <boost/chrono/stopwatches/stopclock_accumulator.hpp>
+#include <boost/chrono/stopwatches/stopwatch.hpp>
+#include <boost/chrono/stopwatches/stopwatch_accumulator.hpp>
+#include <boost/chrono/stopwatches/stopwatch_accumulator_formatter.hpp>
+#include <boost/chrono/stopwatches/stopwatch_accumulator_time_formatter.hpp>
+#include <boost/chrono/stopwatches/stopwatch_formatter.hpp>
+#include <boost/chrono/stopwatches/stopwatch_reporter.hpp>
+#include <boost/chrono/stopwatches/stopwatch_scoped.hpp>
+#include <boost/chrono/stopwatches/time_formatter.hpp>
+#include <boost/chrono/stopwatches/t24_hours.hpp>
+#include <boost/chrono/stopwatches/t24_hours_formatter.hpp>
+//-----------------------------------------------------------------------------
+
+#endif // BOOST_STOPWATCHES_STOPWATCHES_HPP

Added: sandbox/stopwatches/boost/chrono/stopwatches/suspendible_clock.hpp
==============================================================================
--- (empty file)
+++ sandbox/stopwatches/boost/chrono/stopwatches/suspendible_clock.hpp 2011-09-11 08:43:58 EDT (Sun, 11 Sep 2011)
@@ -0,0 +1,198 @@
+// boost/chrono/suspendible_clock.hpp -----------------------------------------------------------//
+// Copyright 2009-2011 Vicente J. Botet Escriba
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+// See http://www.boost.org/libs/chrono/stopwatches for documentation.
+
+#ifndef BOOST_STOPWATCHES_SUSPENDIBLE_CLOCK_HPP
+#define BOOST_STOPWATCHES_SUSPENDIBLE_CLOCK_HPP
+
+#include <boost/version.hpp>
+#include <boost/chrono/chrono.hpp>
+#include <boost/chrono/stopwatches/clock_suspender.hpp>
+#include <boost/system/error_code.hpp>
+#include <boost/thread/tss.hpp>
+#include <memory>
+
+namespace boost { namespace chrono {
+
+ template < class Clock=chrono::high_resolution_clock >
+ class suspendible_clock {
+ public:
+ typedef typename Clock::duration duration;
+ typedef typename Clock::rep rep;
+ typedef typename Clock::period period;
+ typedef chrono::time_point<suspendible_clock<Clock> > time_point;
+ static const bool is_steady = true;
+
+ private:
+ struct thread_specific_context {
+ bool suspended_;
+ time_point suspended_time_;
+ duration suspended_duration_;
+ std::size_t suspend_level_;
+
+ thread_specific_context()
+ : suspended_(false)
+ , suspended_time_()
+ , suspended_duration_(duration::zero())
+ , suspend_level_(0)
+ {}
+ duration suspended(system::error_code & ec = BOOST_CHRONO_THROWS) {
+ if (!suspended_) {
+ ec.clear();
+ return suspended_duration_;
+ } else {
+ time_point tmp;
+ tmp+=duration(Clock::now(ec).time_since_epoch());
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return duration::zero();
+ }
+ return suspended_duration_ + tmp - suspended_time_;
+ }
+ }
+
+ void suspend( system::error_code & ec = BOOST_CHRONO_THROWS ) {
+ if (!suspended_) {
+ time_point tmp;
+ tmp+=duration(Clock::now(ec).time_since_epoch());
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return;
+ }
+ ++suspend_level_;
+ suspended_time_ = tmp;
+ suspended_=true;
+ } else {
+ ec.clear();
+ ++suspend_level_;
+ }
+ }
+ void resume( system::error_code & ec = BOOST_CHRONO_THROWS ) {
+ if (suspended_&&(--suspend_level_==0)) {
+ time_point tmp;
+ tmp+=duration(Clock::now(ec).time_since_epoch());
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return;
+ }
+ suspended_duration_ += tmp - suspended_time_;
+ suspended_=false;
+ } else {
+ ec.clear();
+ }
+ }
+
+ };
+ static thread_specific_context* instance(system::error_code & ec) {
+ thread_specific_context* ptr= ptr_.get();
+ if (ptr==0) {
+ if (BOOST_CHRONO_IS_THROWS(ec)) {
+ std::auto_ptr<thread_specific_context> ptr2(new thread_specific_context());
+ ptr_.reset(ptr2.get());
+ ptr = ptr2.release();
+ } else {
+ ptr=(new(std::nothrow) thread_specific_context());
+ if (ptr==0) {
+#if (BOOST_VERSION / 100 % 1000) < 44
+ ec.assign( system::errc::resource_unavailable_try_again, system::generic_category );
+#else
+ ec.assign( system::errc::resource_unavailable_try_again, system::generic_category() );
+#endif
+ return 0;
+ }
+ try {
+ ptr_.reset(ptr);
+ } catch (...) {
+#if (BOOST_VERSION / 100 % 1000) < 44
+ ec.assign( system::errc::resource_unavailable_try_again, system::generic_category );
+#else
+ ec.assign( system::errc::resource_unavailable_try_again, system::generic_category() );
+#endif
+ return 0;
+ }
+ }
+ }
+ ec.clear();
+ return ptr;
+ }
+
+ static thread_specific_ptr<thread_specific_context> ptr_;
+ public:
+ static time_point now( ) {
+ time_point res;
+ res+= duration(Clock::now().time_since_epoch())-suspended();
+ return res;
+ }
+
+ static time_point now( system::error_code & ec ) {
+ time_point res;
+ typename Clock::time_point t=Clock::now(ec);
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return time_point();
+ }
+ res+= duration(t.time_since_epoch())-suspended(ec);
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return time_point();
+ }
+ return res;
+ }
+
+ static void suspend( system::error_code & ec = BOOST_CHRONO_THROWS ) {
+ thread_specific_context* ptr= instance(ec);
+ if (ptr!=0) ptr->suspend(ec);
+ }
+ static void resume( system::error_code & ec = BOOST_CHRONO_THROWS ) {
+ thread_specific_context* ptr= instance(ec);
+ if (ptr!=0) ptr->resume(ec);
+ }
+ static duration suspended(system::error_code & ec = BOOST_CHRONO_THROWS)
+ {
+ thread_specific_context* ptr= instance(ec);
+ if (ptr!=0) {
+ return ptr->suspended(ec);
+ }
+ else return duration::zero();
+ }
+ class clock_suspender {
+ public:
+ clock_suspender(system::error_code & ec = BOOST_CHRONO_THROWS)
+ : ptr_(instance(ec))
+ {
+ if (ptr_!=0) ptr_->suspend(ec);
+ }
+ ~clock_suspender() {
+ if (ptr_!=0) {
+ system::error_code ec;
+ ptr_->resume(ec);
+ }
+
+ }
+ private:
+ thread_specific_context* ptr_;
+ //~ clock_suspender(); // = delete;
+ clock_suspender(const clock_suspender&); // = delete;
+ clock_suspender& operator=(const clock_suspender&); // = delete;
+ };
+
+ };
+
+ template < class Clock >
+ thread_specific_ptr<typename suspendible_clock<Clock>::thread_specific_context> suspendible_clock<Clock>::ptr_;
+
+ template <class Clock>
+ struct is_suspendible<suspendible_clock<Clock> > : mpl:: true_ {};
+
+ template <class Clock>
+ class clock_suspender<suspendible_clock<Clock> >
+ : public suspendible_clock<Clock>::clock_suspender {
+ public:
+ clock_suspender(system::error_code & ec = BOOST_CHRONO_THROWS) : suspendible_clock<Clock>::clock_suspender(ec) {}
+ private:
+ //~ clock_suspender(); // = delete;
+ clock_suspender(const clock_suspender&); // = delete;
+ clock_suspender& operator=(const clock_suspender&); // = delete;
+ };
+
+} // namespace chrono
+} // namespace boost
+
+#endif // BOOST_CHRONO_SUSPENDIBLE_CLOCK_HPP

Added: sandbox/stopwatches/boost/chrono/stopwatches/t24_hours.hpp
==============================================================================
--- (empty file)
+++ sandbox/stopwatches/boost/chrono/stopwatches/t24_hours.hpp 2011-09-11 08:43:58 EDT (Sun, 11 Sep 2011)
@@ -0,0 +1,67 @@
+// boost/chrono/stopwatches/t24_hours.hpp -----------------------------------------------------------//
+// Copyright 2011 Vicente J. Botet Escriba
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+// See http://www.boost.org/libs/chrono/stopwatches for documentation.
+
+#ifndef BOOST_STOPWATCHES_T24_HOURS_HPP
+#define BOOST_STOPWATCHES_T24_HOURS_HPP
+
+#include <boost/chrono/chrono.hpp>
+
+
+namespace boost { namespace chrono {
+
+class t24_hours {
+ typedef boost::chrono::duration<boost::int_least32_t, ratio<24*3600> > days;
+ typedef boost::chrono::hours hours;
+ typedef boost::chrono::minutes minutes;
+ typedef boost::chrono::seconds seconds;
+ typedef boost::chrono::nanoseconds nanoseconds;
+public:
+ days days_;
+ hours hours_;
+ minutes minutes_;
+ seconds seconds_;
+ nanoseconds nanoseconds_;
+
+ template <class Rep, class Period>
+ static days get_days(const boost::chrono::duration<Rep, Period>& d) {
+ return boost::chrono::duration_cast<days>(d);
+ }
+
+ template <class Rep, class Period>
+ static hours get_hours(const boost::chrono::duration<Rep, Period>& d) {
+ return boost::chrono::duration_cast<hours>(d % days(1));
+ }
+
+ template <class Rep, class Period>
+ static minutes get_minutes(const boost::chrono::duration<Rep, Period>& d) {
+ return boost::chrono::duration_cast<minutes>(d % hours(1));
+ }
+
+ template <class Rep, class Period>
+ static seconds get_seconds(const boost::chrono::duration<Rep, Period>& d) {
+ return boost::chrono::duration_cast<seconds>(d % minutes(1));
+ }
+
+ template <class Rep, class Period>
+ static nanoseconds get_nanoseconds(const boost::chrono::duration<Rep, Period>& d) {
+ return boost::chrono::duration_cast<nanoseconds>(d % seconds(1));
+ }
+
+ template <class Rep, class Period>
+ explicit t24_hours(const boost::chrono::duration<Rep, Period>& d)
+ : days_ (get_days(d))
+ , hours_ (get_hours(d))
+ , minutes_ (get_minutes(d))
+ , seconds_ (get_seconds(d))
+ , nanoseconds_ (get_nanoseconds(d))
+ {}
+};
+
+} // namespace chrono
+} // namespace boost
+
+
+#endif // BOOST_STOPWATCHES_PROCESS_CLOCK_HPP

Added: sandbox/stopwatches/boost/chrono/stopwatches/t24_hours_formatter.hpp
==============================================================================
--- (empty file)
+++ sandbox/stopwatches/boost/chrono/stopwatches/t24_hours_formatter.hpp 2011-09-11 08:43:58 EDT (Sun, 11 Sep 2011)
@@ -0,0 +1,161 @@
+// boost/chrono/stopwatches/t24_hours_formatter.hpp ------------------------------------------------------------//
+// Copyright 2011 Vicente J. Botet Escriba
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+// See http://www.boost.org/libs/chrono/stopwatches for documentation.
+
+#ifndef BOOST_STOPWATCHES_T24_HOURS_FORMATTER_HPP
+#define BOOST_STOPWATCHES_T24_HOURS_FORMATTER_HPP
+
+#include <boost/chrono/chrono.hpp>
+#include <boost/chrono/stopwatches/t24_hours.hpp>
+#include <boost/current_function.hpp>
+#include <boost/chrono/stopwatches/detail/default_out.hpp>
+#include <boost/chrono/stopwatches/detail/adaptive_string.hpp>
+#include <boost/system/error_code.hpp>
+#include <boost/cstdint.hpp>
+#include <string>
+#include <iostream>
+#include <boost/io/ios_state.hpp>
+#include <cstring>
+#include <cassert>
+#include <boost/assert.hpp>
+
+#define BOOST_STOPWATCHES_24_HOURS_FORMAT_DEFAULT "%d day(s) %h:%m:%s.%n\n"
+
+namespace boost { namespace chrono {
+
+//--------------------------------------------------------------------------------------//
+//--------------------------------------------------------------------------------------//
+
+
+ template <
+ typename CharT=char,
+ typename Traits=std::char_traits<CharT>,
+ class Alloc=std::allocator<CharT>
+ >
+ class basic_24_hours_formatter {
+ public:
+
+ typedef std::basic_string<CharT,Traits,Alloc> string_type;
+ typedef CharT char_type;
+ typedef std::basic_ostream<CharT,Traits> ostream_type;
+
+ static ostream_type & default_os();
+ static const char_type* default_format();
+ static string_type format(const char_type* s) {
+ string_type res(s);
+ res += boost::chrono::detail::adaptive_string(" : ");
+ res += default_format();
+ //res += boost::chrono::detail::adaptive_string(" tokes %d day(s) %h:%m:%s.%n\n");
+ return res;
+ }
+ static int default_places() { return 3; }
+
+ template <class Stopwatch >
+ static void show_time( Stopwatch & stopwatch_
+ , const char_type* format, int places, ostream_type & os
+ , system::error_code & ec)
+ // NOTE WELL: Will truncate least-significant digits to LDBL_DIG, which may
+ // be as low as 10, although will be 15 for many common platforms.
+ {
+ typedef typename Stopwatch::duration duration_t;
+ duration_t d = stopwatch_.elapsed( ec );
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return;
+ }
+ if ( d < duration_t::zero() ) return;
+
+ boost::io::ios_flags_saver ifs( os );
+ os.setf( std::ios_base::fixed, std::ios_base::floatfield );
+ boost::io::ios_precision_saver ips( os );
+ os.precision( places );
+
+ t24_hours dt(d);
+ for ( ; *format; ++format ) {
+ if ( (*format != '%') || (!*(format+1)) || (!std::strchr("dhmsn", *(format+1))) ) {
+ os << *format;
+ } else {
+ ++format;
+ switch ( *format ) {
+ case 'd':
+ os << dt.days_.count();
+ break;
+ case 'h':
+ {
+ boost::io::ios_flags_saver ifs( os );
+ os.width(2); os.fill('0');
+ os << dt.hours_.count();
+ break;
+ }
+ case 'm':
+ {
+ boost::io::ios_flags_saver ifs( os );
+ os.width(2); os.fill('0');
+ os << dt.minutes_.count();
+ break;
+ }
+ case 's':
+ {
+ boost::io::ios_flags_saver ifs( os );
+ os.width(2); os.fill('0');
+ os << dt.seconds_.count();
+ break;
+ }
+ case 'n':
+ {
+ boost::io::ios_flags_saver ifs( os );
+ os.width(9); os.fill('0');
+ os << dt.nanoseconds_.count();
+ break;
+ }
+ default:
+ BOOST_ASSERT(0 && "basic_24_hours_formatter internal logic error");
+ }
+ }
+ }
+ }
+ };
+
+namespace detail {
+ template <typename CharT>
+ struct basic_24_hours_formatter_default_format;
+ template <>
+ struct basic_24_hours_formatter_default_format<char> {
+ static const char* apply() {return BOOST_STOPWATCHES_24_HOURS_FORMAT_DEFAULT; }
+ };
+#ifndef BOOST_NO_STD_WSTRING
+ template <>
+ struct basic_24_hours_formatter_default_format<wchar_t> {
+ static const wchar_t* apply() {return L"%d day(s) %h:%m:%s.%n\n"; }
+ };
+
+#endif
+}
+
+ template <typename CharT,typename Traits, class Alloc>
+ const typename basic_24_hours_formatter<CharT,Traits,Alloc>::char_type*
+ basic_24_hours_formatter<CharT,Traits,Alloc>::default_format() {
+ return detail::basic_24_hours_formatter_default_format<CharT>::apply();
+ }
+
+ template <typename CharT,typename Traits, class Alloc>
+ typename basic_24_hours_formatter<CharT,Traits,Alloc>::ostream_type &
+ basic_24_hours_formatter<CharT,Traits,Alloc>::default_os() {
+ return detail::default_out<CharT,Traits>::apply();
+ }
+
+ typedef basic_24_hours_formatter<char> t24_hours_formatter;
+ typedef basic_24_hours_formatter<wchar_t> wt24_hours_formatter;
+
+ } // namespace chrono
+} // namespace boost
+
+#define BOOST_STOPWATCHES_24_HOURS_FORMAT(F) boost::chrono::detail::adaptive_string(F " : " BOOST_STOPWATCHES_24_HOURS_FORMAT_DEFAULT)
+#ifdef __GNUC__
+#define BOOST_STOPWATCHES_24_HOURS_FUNCTION_FORMAT boost::chrono::t24_hours_formatter::format(BOOST_CURRENT_FUNCTION)
+#else
+#define BOOST_STOPWATCHES_24_HOURS_FUNCTION_FORMAT BOOST_STOPWATCHES_24_HOURS_FORMAT(BOOST_CURRENT_FUNCTION)
+#endif
+
+#endif // BOOST_STOPWATCHES_T24_HOURS_FORMATTER_HPP

Added: sandbox/stopwatches/boost/chrono/stopwatches/time_formatter.hpp
==============================================================================
--- (empty file)
+++ sandbox/stopwatches/boost/chrono/stopwatches/time_formatter.hpp 2011-09-11 08:43:58 EDT (Sun, 11 Sep 2011)
@@ -0,0 +1,177 @@
+// boost/chrono/time_formatter.hpp ------------------------------------------------------------//
+// Copyright 2009-2011 Vicente J. Botet Escriba
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+// See http://www.boost.org/libs/chrono/stopwatches for documentation.
+
+#ifndef BOOST_STOPWATCHES_TIME_FORMATTER_HPP
+#define BOOST_STOPWATCHES_TIME_FORMATTER_HPP
+
+#include <boost/chrono/chrono.hpp>
+#include <boost/chrono/process_cpu_clocks.hpp>
+#include <boost/current_function.hpp>
+#include <boost/chrono/stopwatches/detail/default_out.hpp>
+#include <boost/chrono/stopwatches/detail/adaptive_string.hpp>
+#include <boost/system/error_code.hpp>
+#include <boost/cstdint.hpp>
+#include <string>
+#include <iostream>
+#include <boost/io/ios_state.hpp>
+#include <cstring>
+#include <cassert>
+#include <boost/assert.hpp>
+
+#define BOOST_STOPWATCHES_TIME_FORMAT_DEFAULT "real %rs, cpu %cs (%p%), user %us, system %ss\n"
+
+namespace boost { namespace chrono {
+
+//--------------------------------------------------------------------------------------//
+//--------------------------------------------------------------------------------------//
+
+
+ template <
+ typename CharT=char,
+ typename Traits=std::char_traits<CharT>,
+ class Alloc=std::allocator<CharT>
+ >
+ class basic_time_formatter {
+ public:
+
+ typedef std::basic_string<CharT,Traits,Alloc> string_type;
+ typedef CharT char_type;
+ typedef std::basic_ostream<CharT,Traits> ostream_type;
+
+ static ostream_type & default_os();
+ static const char_type* default_format();
+ static string_type format(const char_type* s) {
+ string_type res(s);
+ res += boost::chrono::detail::adaptive_string(" : ");
+ res += default_format();
+ //res += boost::chrono::detail::adaptive_string(" spent real %rs, cpu %cs (%p%), user %us, system %ss\n");
+ return res;
+ }
+ static int default_places() { return 3; }
+
+ template <class Stopwatch >
+ static void show_time( typename Stopwatch::duration::rep const & times
+ , const char_type* format, int places, ostream_type & os
+ , system::error_code & ec
+ )
+ // NOTE WELL: Will truncate least-significant digits to LDBL_DIG, which may
+ // be as low as 10, although will be 15 for many common platforms.
+ {
+ if (!BOOST_CHRONO_IS_THROWS(ec)) ec.clear();
+ typedef typename Stopwatch::duration duration;
+ typedef typename duration::rep rep;
+ if ( times.real < 0 ) return;
+ if ( places > 9 )
+ places = 9; // sanity check
+ else if ( places < 0 )
+ places = 0;
+
+ boost::io::ios_flags_saver ifs( os );
+ os.setf( std::ios_base::fixed, std::ios_base::floatfield );
+ boost::io::ios_precision_saver ips( os );
+ os.precision( places );
+
+ chrono::nanoseconds total = chrono::nanoseconds(times.system + times.user);
+
+ for ( ; *format; ++format )
+ {
+ if ( (*format != '%') || (!*(format+1)) || (!std::strchr("rcpus", *(format+1))) )
+ os << *format;
+ else
+ {
+ ++format;
+ switch ( *format )
+ {
+ case 'r':
+ os << boost::chrono::duration<double>(chrono::nanoseconds(times.real)).count();
+ break;
+ case 'u':
+ os << boost::chrono::duration<double>(chrono::nanoseconds(times.user)).count();
+ break;
+ case 's':
+ os << boost::chrono::duration<double>(chrono::nanoseconds(times.system)).count();
+ break;
+ case 'c':
+ os << boost::chrono::duration<double>(total).count();
+ break;
+ case 'p':
+ {
+ boost::io::ios_precision_saver ips( os );
+ os.precision( 1 );
+ if ( times.real && total.count() )
+ os << boost::chrono::duration<double>(total).count()
+ /boost::chrono::duration<double>(chrono::nanoseconds(times.real)).count() * 100.0;
+ else
+ os << 0.0;
+ }
+ break;
+ default:
+ BOOST_ASSERT(0 && "basic_time_formatter internal logic error");
+ }
+ }
+ }
+ }
+
+ template <class Stopwatch >
+ static void show_time( Stopwatch & stopwatch_
+ , const char_type* format, int places, ostream_type & os
+ , system::error_code & ec)
+ // NOTE WELL: Will truncate least-significant digits to LDBL_DIG, which may
+ // be as low as 10, although will be 15 for many common platforms.
+ {
+ typedef typename Stopwatch::duration duration;
+ typedef typename duration::rep rep;
+ duration d = stopwatch_.elapsed( ec );
+ if (!BOOST_CHRONO_IS_THROWS(ec)) {
+ if (ec) return;
+ }
+ rep times=d.count();
+ show_time<Stopwatch>(times, format, places, os, ec);
+ }
+ };
+
+namespace detail {
+ template <typename CharT>
+ struct basic_time_formatter_default_format;
+ template <>
+ struct basic_time_formatter_default_format<char> {
+ static const char* apply() {return BOOST_STOPWATCHES_TIME_FORMAT_DEFAULT; }
+ };
+#ifndef BOOST_NO_STD_WSTRING
+ template <>
+ struct basic_time_formatter_default_format<wchar_t> {
+ static const wchar_t* apply() {return L"real %rs, cpu %cs (%p%), user %us, system %ss\n"; }
+ };
+
+#endif
+}
+
+ template <typename CharT,typename Traits, class Alloc>
+ const typename basic_time_formatter<CharT,Traits,Alloc>::char_type*
+ basic_time_formatter<CharT,Traits,Alloc>::default_format() {
+ return detail::basic_time_formatter_default_format<CharT>::apply();
+ }
+
+ template <typename CharT,typename Traits, class Alloc>
+ typename basic_time_formatter<CharT,Traits,Alloc>::ostream_type &
+ basic_time_formatter<CharT,Traits,Alloc>::default_os() {
+ return detail::default_out<CharT,Traits>::apply();
+ }
+
+ typedef basic_time_formatter<char> time_formatter;
+ typedef basic_time_formatter<wchar_t> wtime_formatter;
+
+ } // namespace chrono
+} // namespace boost
+
+#define BOOST_STOPWATCHES_TIME_FORMAT(F) boost::chrono::detail::adaptive_string(F " : " BOOST_STOPWATCHES_TIME_FORMAT_DEFAULT)
+#ifdef __GNUC__
+#define BOOST_STOPWATCHES_TIME_FUNCTION_FORMAT boost::chrono::time_formatter::format(BOOST_CURRENT_FUNCTION)
+#else
+#define BOOST_STOPWATCHES_TIME_FUNCTION_FORMAT BOOST_STOPWATCHES_TIME_FORMAT(BOOST_CURRENT_FUNCTION)
+#endif
+
+#endif // BOOST_STOPWATCHES_TIME_FORMATTER_HPP

Added: sandbox/stopwatches/libs/chrono/stopwatches/Jamroot.jam
==============================================================================
--- (empty file)
+++ sandbox/stopwatches/libs/chrono/stopwatches/Jamroot.jam 2011-09-11 08:43:58 EDT (Sun, 11 Sep 2011)
@@ -0,0 +1,9 @@
+
+import modules ;
+
+local boost = [ modules.peek : BOOST ] ;
+
+project sandbox : requirements <include>$(boost) ;
+
+# This seems to prevent some Boost.Build errors that otherwise occur :-(
+use-project /boost : $(boost) ;

Added: sandbox/stopwatches/libs/chrono/stopwatches/boost-build.jam
==============================================================================
--- (empty file)
+++ sandbox/stopwatches/libs/chrono/stopwatches/boost-build.jam 2011-09-11 08:43:58 EDT (Sun, 11 Sep 2011)
@@ -0,0 +1,72 @@
+# Copyright Rene Rivera 2007.
+#
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+# For instructions see Jamfile.v2, or "bjam --help".
+
+local rule if-has-file ( file + : dir * )
+{
+ local result ;
+ if $(dir)
+ {
+ result = [ GLOB $(dir) : $(file) ] ;
+ }
+ return $(result[1]:P) ;
+}
+
+#~ Attempts to find the Boost source tree...
+
+local boost-src = [ if-has-file LICENSE_1_0.txt :
+ [ MATCH --boost=(.*) : $(ARGV) ]
+ $(BOOST)
+ $(BOOST_ROOT)
+ $(.boost-build-file:D)/../boost
+ $(.boost-build-file:D)/../Trunk
+ ] ;
+
+# error handling:
+if ! $(boost-src)
+{
+ ECHO Unable to find the Boost source tree in the locations searched. ;
+ ECHO Try setting the environment variable BOOST to point to your ;
+ ECHO Boost tree, or else invoke bjam with the --boost=path option. ;
+ ECHO The Boost include path will not be automatically set. ;
+ ECHO The paths searched were [ MATCH --boost=(.*) : $(ARGV) ] $(BOOST) $(.boost-build-file:D)/../boost $(.boost-build-file:D)/../Trunk ;
+ ECHO But the file LICENSE_1_0.txt was not found in any of them ;
+}
+
+#~ Attempts to find the Boost.Build files...
+
+local boost-build-src = [ if-has-file bootstrap.jam :
+ [ MATCH --boost-build=(.*) : $(ARGV) ]
+ $(BOOST_BUILD_PATH)
+ $(BOOST_BUILD)
+ $(boost-src)/tools/build/v2
+ ] ;
+
+# error handling:
+if ! $(boost-build-src)
+{
+ ECHO Unable to find the Boost.Build source tree in the locations searched. ;
+ ECHO Try setting the environment variable BOOST_BUILD to point to your ;
+ ECHO Boost.Build tree, or else invoke bjam with the --boost-build=path option. ;
+ ECHO The paths searched were [ MATCH --boost-build=(.*) : $(ARGV) ] $(BOOST_BUILD_PATH) $(BOOST_BUILD) $(boost-src)/tools/build/v2 ;
+ ECHO But bootstrap.jam was not found in any of these ;
+ ECHO More failures will very likely follow... ;
+}
+
+#~ Set some common vars to refer to the Boost sources...
+
+BOOST ?= $(boost-src) ;
+BOOST_ROOT ?= $(boost-src) ;
+
+#~ And load up Boost.Build...
+
+boost-build $(boost-build-src) ;
+
+
+
+
+

Added: sandbox/stopwatches/libs/chrono/stopwatches/doc/Jamfile.v2
==============================================================================
--- (empty file)
+++ sandbox/stopwatches/libs/chrono/stopwatches/doc/Jamfile.v2 2011-09-11 08:43:58 EDT (Sun, 11 Sep 2011)
@@ -0,0 +1,103 @@
+# Boost.Chrono.Stopwatches library documentation Jamfile ---------------------------------
+#
+# Copyright Vicente J. Botet Escriba 2009-2011. Use, modification and
+# distribution is subject to the Boost Software License, Version
+# 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+#
+# See http://www.boost.org for updates, documentation, and revision history.
+
+#import doxygen ;
+import os ;
+import quickbook ;
+
+#local boost-root = [ os.environ BOOST ] ;
+path-constant boost-root : [ modules.peek : BOOST ] ;
+
+path-constant images_location : html ;
+
+#doxygen autodoc
+# :
+# [ glob ../../../boost/chrono/*.hpp ]
+# [ glob ../../../boost/chrono/allocators/*.hpp ]
+# :
+# <doxygen:param>EXTRACT_ALL=NO
+# <doxygen:param>HIDE_UNDOC_MEMBERS=YES
+# <doxygen:param>EXTRACT_PRIVATE=NO
+# <doxygen:param>EXPAND_ONLY_PREDEF=YES
+# <doxygen:param>PREDEFINED=BOOST_INTERPROCESS_DOXYGEN_INVOKED
+# <xsl:param>"boost.doxygen.reftitle=Boost.Chrono Reference"
+# ;
+
+xml stopwatches : stopwatches.qbk ;
+
+boostbook standalone
+ :
+ stopwatches
+ :
+ # HTML options first:
+ # Use graphics not text for navigation:
+ <xsl:param>navig.graphics=1
+ # How far down we chunk nested sections, basically all of them:
+ <xsl:param>chunk.section.depth=1
+ # Don't put the first section on the same page as the TOC:
+ <xsl:param>chunk.first.sections=1
+ # How far down sections get TOC's
+ <xsl:param>toc.section.depth=4
+ # Max depth in each TOC:
+ <xsl:param>toc.max.depth=2
+ # How far down we go with TOC's
+ <xsl:param>generate.section.toc.level=10
+ # Path for links to Boost:
+ #<xsl:param>boost.root=../../../..
+ # Path for libraries index:
+ #<xsl:param>boost.libraries=../../../../libs/libraries.htm
+ # Use the main Boost stylesheet:
+ #<xsl:param>html.stylesheet=../../../../doc/src/boostbook.css
+
+ # PDF Options:
+ # TOC Generation: this is needed for FOP-0.9 and later:
+ <format>pdf:<xsl:param>fop1.extensions=0
+ # Or enable this if you're using XEP:
+ <format>pdf:<xsl:param>xep.extensions=1
+ # TOC generation: this is needed for FOP 0.2, but must not be set to zero for FOP-0.9!
+ <format>pdf:<xsl:param>fop.extensions=0
+ # No indent on body text:
+ <xsl:param>body.start.indent=0pt
+ # Margin size:
+ <xsl:param>page.margin.inner=0.5in
+ # Margin size:
+ <xsl:param>page.margin.outer=0.5in
+ # Yes, we want graphics for admonishments:
+ <xsl:param>admon.graphics=1
+ # Set this one for PDF generation *only*:
+ # default pnd graphics are awful in PDF form,
+ # better use SVG's instead:
+ <format>pdf:<xsl:param>admon.graphics.extension=".svg"
+ <format>pdf:<xsl:param>admon.graphics.path=$(boost-images)
+ <format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/libs/chrono/stopwatches/doc/html
+
+ <dependency>css
+ <dependency>png
+ #<dependency>svg
+
+ ;
+
+
+install pdf-install : standalone : <location>. <install-type>PDF ;
+
+install css :
+ $(boost-root)/doc/src/boostbook.css :
+ <location>html
+ ;
+
+install png :
+ [ glob $(boost-root)/doc/src/images/*.png ] :
+ <location>html/images
+ ;
+
+install svg :
+ [ glob $(boost-root)/doc/src/images/*.svg ] :
+ <location>html/images
+ ;
+

Added: sandbox/stopwatches/libs/chrono/stopwatches/doc/html/boost_chrono_stopwatches/appendices.html
==============================================================================
--- (empty file)
+++ sandbox/stopwatches/libs/chrono/stopwatches/doc/html/boost_chrono_stopwatches/appendices.html 2011-09-11 08:43:58 EDT (Sun, 11 Sep 2011)
@@ -0,0 +1,1025 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Appendices</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.0">
+<link rel="home" href="../index.html" title="Boost.Chrono.Stopwatches 0.3.0">
+<link rel="up" href="../index.html" title="Boost.Chrono.Stopwatches 0.3.0">
+<link rel="prev" href="reference.html" title="Reference">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="reference.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_chrono_stopwatches.appendices"></a><a class="link" href="appendices.html" title="Appendices">Appendices</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="appendices.html#boost_chrono_stopwatches.appendices.history">Appendix
+ A: History</a></span></dt>
+<dd><dl>
+<dt><span class="section">Version 0.3.0, September 6, 2011 </span></dt>
+<dt><span class="section">Version 0.2.0, Feb 6, 2011 </span></dt>
+<dt><span class="section">Version 0.1.0, September 10, 2010 </span></dt>
+</dl></dd>
+<dt><span class="section"><a href="appendices.html#boost_chrono_stopwatches.appendices.rationale">Appendix
+ B: Rationale</a></span></dt>
+<dt><span class="section"><a href="appendices.html#boost_chrono_stopwatches.appendices.implementation">Appendix
+ C: Implementation Notes</a></span></dt>
+<dt><span class="section"><a href="appendices.html#boost_chrono_stopwatches.appendices.faq">Appendix D:
+ FAQ</a></span></dt>
+<dt><span class="section"><a href="appendices.html#boost_chrono_stopwatches.appendices.acknowledgements">Appendix
+ E: Acknowledgements</a></span></dt>
+<dt><span class="section"><a href="appendices.html#boost_chrono_stopwatches.appendices.tests">Appendix F:
+ Tests</a></span></dt>
+<dd><dl><dt><span class="section">stopwatch</span></dt></dl></dd>
+<dt><span class="section"><a href="appendices.html#boost_chrono_stopwatches.appendices.tickets">Appendix
+ G: Tickets</a></span></dt>
+<dt><span class="section"><a href="appendices.html#boost_chrono_stopwatches.appendices.perf">Appendix H:
+ Performances</a></span></dt>
+<dt><span class="section"><a href="appendices.html#boost_chrono_stopwatches.appendices.todo">Appendix I:
+ Future plans</a></span></dt>
+</dl></div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_chrono_stopwatches.appendices.history"></a><a class="link" href="appendices.html#boost_chrono_stopwatches.appendices.history" title="Appendix A: History">Appendix
+ A: History</a>
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">Version 0.3.0, September 6, 2011 </span></dt>
+<dt><span class="section">Version 0.2.0, Feb 6, 2011 </span></dt>
+<dt><span class="section">Version 0.1.0, September 10, 2010 </span></dt>
+</dl></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono_stopwatches.appendices.history.__version_0_3_0__september_6__2011__"></a><a class="link" href="appendices.html#boost_chrono_stopwatches.appendices.history.__version_0_3_0__september_6__2011__" title="Version 0.3.0, September 6, 2011"><span class="bold"><strong>Version 0.3.0, September 6, 2011</strong></span> </a>
+</h4></div></div></div>
+<p>
+ <span class="bold"><strong>Features:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ Reinsertion of Boost.Stopwatches as a sub-library of Boost.Chrono.
+ </li>
+<li class="listitem">
+ Rename boost::stopwatches namespace to boost::chrono
+ </li>
+</ul></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono_stopwatches.appendices.history.__version_0_2_0__feb_6__2011__"></a><a class="link" href="appendices.html#boost_chrono_stopwatches.appendices.history.__version_0_2_0__feb_6__2011__" title="Version 0.2.0, Feb 6, 2011"><span class="bold"><strong>Version 0.2.0, Feb 6, 2011</strong></span> </a>
+</h4></div></div></div>
+<p>
+ <span class="bold"><strong>Features:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+ Adaptation to new Boost.Chrono interface.
+ </li></ul></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono_stopwatches.appendices.history.__version_0_1_0__september_10__2010__"></a><a class="link" href="appendices.html#boost_chrono_stopwatches.appendices.history.__version_0_1_0__september_10__2010__" title="Version 0.1.0, September 10, 2010"><span class="bold"><strong>Version 0.1.0, September 10, 2010</strong></span> </a>
+</h4></div></div></div>
+<p>
+ <span class="bold"><strong>Features:</strong></span>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+ Extraction from Boost.Chrono of Boost.Stopwatches
+ </li></ul></div>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_chrono_stopwatches.appendices.rationale"></a><a class="link" href="appendices.html#boost_chrono_stopwatches.appendices.rationale" title="Appendix B: Rationale">Appendix
+ B: Rationale</a>
+</h3></div></div></div>
+<a name="boost_chrono_stopwatches.appendices.rationale.how_reliable_are_these_measures_"></a><h5>
+<a name="idp19640320"></a>
+ <a class="link" href="appendices.html#boost_chrono_stopwatches.appendices.rationale.how_reliable_are_these_measures_">How
+ reliable are these measures?</a>
+ </h5>
+<p>
+ There are three cases which can lead to get unreliable measures:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+ It is not possible to measure events that transpire at rates of the same
+ order of magnitude as the clock's precision with any reliability. For
+ example, a 10ms clock cannot be used reliably to measure elapsed times
+ of tens of milliseconds. The library provides a [high_resolution_clock]
+ that gives you the highest resolution time available on your platform.
+ That will give the best precision, but can only be used for reliable
+ measurement of events that elapse about an order of magnitude slower
+ than that clock's precision.
+ </li></ul></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+ <span class="special">...</span>
+ <a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_hpp.stopclock" title="Template Class stopclock&lt;&gt;"><code class="computeroutput"><span class="identifier">stopclock</span></code></a><span class="special">&lt;</span> <code class="computeroutput"><span class="identifier">high_resolution_clock</span></code><span class="special">&gt;</span> <span class="identifier">_</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ Using a process clock in a multithreaded application will give elapsed
+ time for the process as a whole, including threads other than the calling
+ thread. To get time elapsed for a specific thread, use the supplied
+ <code class="computeroutput"><span class="identifier">thread_clock</span></code> which returns
+ time elapsed for the calling thread only, if supported by the platform.
+ </li>
+<li class="listitem">
+ When stopclocks are nested, usually from stopclocks appearing in each
+ of several nested function calls, the overhead of the stopclock processing
+ begins to be significant relative to run time of the code being measured.
+ The innermost measurements remain accurate, but those in the outermost
+ layers can measure too much overhead to be trustworthy.
+ </li>
+<li class="listitem">
+ Nested stopclocks (usually nested function calls where each function
+ contains a stopclock). When the nesting is deep enough, the cumulative
+ overhead of all the stopclock functionality make the data unreliable
+ except for the inner-most trace points. The question is, how much time
+ is related to the application code we want to measure and how much to
+ the fact we are meassuring and logging in inner blocks?
+ </li>
+</ul></div>
+<p>
+ Most of the stopclock overhead is likely due to logging. There are two things
+ we can do to make the difference :
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ Don't flush log information while measuring elapsed time. A <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_accumulator_hpp.stopwatch_accumulator" title="Template Class stopwatch_accumulator&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch_accumulator</span></code></a> can make
+ that possible, because it don't report until all the measures have been
+ compiled and then report some statistics. Alternatively, an asynchronous
+ stream would permit normal logging but by a thread other than the one
+ being measured.
+ </li>
+<li class="listitem">
+ Add a mechanism to track the difference between the application time
+ and stopclock time. If a <code class="computeroutput"><span class="identifier">Clock</span></code>
+ models <a class="link" href="reference.html#boost_chrono_stopwatches.reference.other_clocks.suspendible_clock_req" title="SuspendibleClock Requirements"><code class="computeroutput"><span class="identifier">SuspendibleClock</span></code></a> and its precision
+ is sufficiently fine, this mechanism could suspend the <code class="computeroutput"><span class="identifier">Clock</span></code>'s counting while reporting measurements
+ and resume it thereafter.
+ </li>
+</ul></div>
+</div>
+<div class="section"><div class="titlepage"><div><div><h3 class="title">
+<a name="boost_chrono_stopwatches.appendices.implementation"></a><a class="link" href="appendices.html#boost_chrono_stopwatches.appendices.implementation" title="Appendix C: Implementation Notes">Appendix
+ C: Implementation Notes</a>
+</h3></div></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_chrono_stopwatches.appendices.faq"></a><a class="link" href="appendices.html#boost_chrono_stopwatches.appendices.faq" title="Appendix D: FAQ">Appendix D:
+ FAQ</a>
+</h3></div></div></div>
+<a name="boost_chrono_stopwatches.appendices.faq.why_does_stopwatch_reporter_only_display_millisecond_place_precision_when_the_underlying_clock_has_nanosecond_precision_"></a><h5>
+<a name="idp19674592"></a>
+ <a class="link" href="appendices.html#boost_chrono_stopwatches.appendices.faq.why_does_stopwatch_reporter_only_display_millisecond_place_precision_when_the_underlying_clock_has_nanosecond_precision_">Why
+ does stopwatch_reporter only display millisecond place precision when the
+ underlying Clock has nanosecond precision?</a>
+ </h5>
+<p>
+ To avoid giving the impression of precision where none exists. See Caveat
+ emptor. You can always specify additional decimal places if you want to live
+ dangerously.
+ </p>
+<a name="boost_chrono_stopwatches.appendices.faq.why_does_stopwatch_reporter_sometimes_report_more_cpu_seconds_than_real_seconds_"></a><h5>
+<a name="idp19675424"></a>
+ <a class="link" href="appendices.html#boost_chrono_stopwatches.appendices.faq.why_does_stopwatch_reporter_sometimes_report_more_cpu_seconds_than_real_seconds_">Why
+ does stopwatch_reporter sometimes report more cpu seconds than real seconds?</a>
+ </h5>
+<p>
+ Ask your operating system supplier. The results have been inspected with
+ a debugger, and both for Windows and Linux, that's what the OS appears to
+ be reporting at times.
+ </p>
+<a name="boost_chrono_stopwatches.appendices.faq.can_i_obtain_statistics_of_the_time_elapsed_between_calls_to_a_function_"></a><h5>
+<a name="idp19680880"></a>
+ <a class="link" href="appendices.html#boost_chrono_stopwatches.appendices.faq.can_i_obtain_statistics_of_the_time_elapsed_between_calls_to_a_function_">Can
+ I obtain statistics of the time elapsed between calls to a function?</a>
+ </h5>
+<p>
+ The library does not provides this feature.
+ </p>
+<a name="boost_chrono_stopwatches.appendices.faq.what_happens_if_i_press_ctrl_c_and_program_terminates__what_log_would_boost_stopwatches_output_"></a><h5>
+<a name="idp19684048"></a>
+ <a class="link" href="appendices.html#boost_chrono_stopwatches.appendices.faq.what_happens_if_i_press_ctrl_c_and_program_terminates__what_log_would_boost_stopwatches_output_">What
+ happens if I press Ctrl+C and program terminates? What log would Boost.Stopwatches
+ output?</a>
+ </h5>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_chrono_stopwatches.appendices.acknowledgements"></a><a class="link" href="appendices.html#boost_chrono_stopwatches.appendices.acknowledgements" title="Appendix E: Acknowledgements">Appendix
+ E: Acknowledgements</a>
+</h3></div></div></div>
+<p>
+ The library's started from the Beman Dawes <code class="computeroutput"><span class="identifier">timer</span><span class="special">&lt;&gt;</span></code>, <code class="computeroutput"><span class="identifier">process_clock</span></code>,
+ <code class="computeroutput"><span class="identifier">process_timer</span></code>, <code class="computeroutput"><span class="identifier">run_timer</span></code> classes which are now deprecated
+ and replaced by the <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp.stopwatch" title="Template Class stopwatch&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch</span></code></a>, <code class="computeroutput"><span class="identifier">process_cpu_clock</span></code>
+ and <code class="computeroutput"><span class="identifier">stopclock</span></code> classes.
+ </p>
+<p>
+ Thanks to Adrew Chinoff for its multiple suggestion on <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_accumulator_hpp.stopwatch_accumulator" title="Template Class stopwatch_accumulator&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch_accumulator</span></code></a>, and helping
+ me to polish the documentation.
+ </p>
+<p>
+ Thanks to Tom Tan for reporting some compiler issues with MSVC V10 beta and
+ MinGW-gcc-4.4.0 and for the many suggestion he did concerning the <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp.stopwatch" title="Template Class stopwatch&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch</span></code></a>, <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.lightweight_stopwatch_hpp.lightweight_stopwatch" title="Template Class lightweight_stopwatch&lt;&gt;"><code class="computeroutput"><span class="identifier">lightweight_stopwatch</span></code></a>, and <a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_hpp.stopclock" title="Template Class stopclock&lt;&gt;"><code class="computeroutput"><span class="identifier">stopclock</span></code></a> classes and a deep help
+ with wide characters implementation.
+ </p>
+<p>
+ Thanks to Ronald Bock for reporting Valgind issues and for the many suggestion
+ he did concerning the documentation.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_chrono_stopwatches.appendices.tests"></a><a class="link" href="appendices.html#boost_chrono_stopwatches.appendices.tests" title="Appendix F: Tests">Appendix F:
+ Tests</a>
+</h3></div></div></div>
+<div class="toc"><dl><dt><span class="section">stopwatch</span></dt></dl></div>
+<p>
+ In order to test you need to do.
+ </p>
+<pre class="programlisting"><span class="identifier">bjam</span> <span class="identifier">libs</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">test</span>
+</pre>
+<p>
+ You can also run a specific suite of test by doing
+ </p>
+<pre class="programlisting"><span class="identifier">cd</span> <span class="identifier">libs</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">test</span>
+<span class="identifier">bjam</span> <span class="identifier">stopwatch</span>
+</pre>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono_stopwatches.appendices.tests.stopwatch"></a><a class="link" href="appendices.html#boost_chrono_stopwatches.appendices.tests.stopwatch" title="stopwatch">stopwatch</a>
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ kind
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+<th>
+ <p>
+ Result
+ </p>
+ </th>
+<th>
+ <p>
+ Ticket
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ test_min_max
+ </p>
+ </td>
+<td>
+ <p>
+ compile
+ </p>
+ </td>
+<td>
+ <p>
+ test compilation succeeds in the presence of macros min and max.
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ stopwatch_example
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ ...
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ scoped_stopwatch_example
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ ...
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ stopwatch_accumulator_example
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ ...
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ specific_stopwatch_accumulator_example
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ ...
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ stopclock_example
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ ...
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ stopclock_accumulator_example
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ ...
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ nested_stopclock_accumulator_example
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ ...
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ loop_stopclock_accumulator_example
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ ...
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ t24_hours_example
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ ...
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ scoped_stopclock_example
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ ...
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ timex
+ </p>
+ </td>
+<td>
+ <p>
+ link
+ </p>
+ </td>
+<td>
+ <p>
+ ...
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ stopclock_constructor_overload_test
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ ...
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ wstopclock_constructor_overload_test
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ ...
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_chrono_stopwatches.appendices.tickets"></a><a class="link" href="appendices.html#boost_chrono_stopwatches.appendices.tickets" title="Appendix G: Tickets">Appendix
+ G: Tickets</a>
+</h3></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Ticket
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+<th>
+ <p>
+ Resolution
+ </p>
+ </th>
+<th>
+ <p>
+ State
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ 1
+ </p>
+ </td>
+<td>
+ <p>
+ suspend doesn't works: partial_ not initialized
+ </p>
+ </td>
+<td>
+ <p>
+ initialize with duration::zero()
+ </p>
+ </td>
+<td>
+ <p>
+ Closed
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ 2
+ </p>
+ </td>
+<td>
+ <p>
+ suspend doesn't works: elapsed doesn't take care of partial_
+ </p>
+ </td>
+<td>
+ <p>
+ take care of partial
+ </p>
+ </td>
+<td>
+ <p>
+ Closed
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ 3
+ </p>
+ </td>
+<td>
+ <p>
+ suspend doesn't works: bad use of system::error_code &amp; ec
+ </p>
+ </td>
+<td>
+ <p>
+ replace by system::error_code ec
+ </p>
+ </td>
+<td>
+ <p>
+ Closed
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ 4
+ </p>
+ </td>
+<td>
+ <p>
+ Use of Specific formatters doesn't works
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Closed
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ 5
+ </p>
+ </td>
+<td>
+ <p>
+ boost/chrono/scoped_suspend.hpp(31) : warning C4520: 'boost::chrono::scoped_suspend&lt;Clock&gt;'
+ : multiple default constructors specified
+ </p>
+ </td>
+<td>
+ <p>
+ Remove the default constructor deletion
+ </p>
+ </td>
+<td>
+ <p>
+ Closed
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ 6
+ </p>
+ </td>
+<td>
+ <p>
+ suspendible_clock_test doesn't works in my mingw environement
+ </p>
+ </td>
+<td>
+ <p>
+ (issue with tss)
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="bold"><strong>Open</strong></span>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ 7
+ </p>
+ </td>
+<td>
+ <p>
+ error_code not initialized
+ </p>
+ </td>
+<td>
+ <p>
+ Use ec.clear() before throwing a exception.
+ </p>
+ </td>
+<td>
+ <p>
+ Closed
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ 8
+ </p>
+ </td>
+<td>
+ <p>
+ Valgrind issue: Conditional jump or move depends on uninitialised
+ value(s)
+ </p>
+ </td>
+<td>
+ <p>
+ Replace the test
+ </p>
+ </td>
+<td>
+ <p>
+ Closed
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_chrono_stopwatches.appendices.perf"></a><a class="link" href="appendices.html#boost_chrono_stopwatches.appendices.perf" title="Appendix H: Performances">Appendix H:
+ Performances</a>
+</h3></div></div></div>
+<p>
+ We have run some program changing how the reporting is done.
+ </p>
+<p>
+ NONE: no report is done on the inner function HIGH: every call to the recursive
+ function is reported using an stopclock SUSPEND: every call to the recursive
+ function is reported using a using an stopclock on a suspendible clock ACCU:
+ every call to the recursive function is tracked using a stopclock_accumulator
+ </p>
+<p>
+ We have run the programm with two different clocks, high_resolution_clock
+ and thread_clock.
+ </p>
+<p>
+ The programs are either single-threaded or multi-threaded.
+ </p>
+<p>
+ Two kind of inner functions are used: recursive or non recursive. In order
+ to test the influence of nesting reports, the non recursive functions use
+ up to 10 nesting levels, depending on its parameter.
+ </p>
+<p>
+ the function at level n is defined as follows
+ </p>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">fn</span><span class="special">(</span><span class="keyword">long</span> <span class="identifier">v</span><span class="special">)</span> <span class="special">{</span>
+ <span class="comment">// reporting or not
+</span> <span class="identifier">stopclock</span><span class="special">&lt;&gt;</span> <span class="identifier">_</span><span class="special">;</span>
+ <span class="comment">// burn some time
+</span> <span class="keyword">for</span> <span class="special">(</span> <span class="keyword">long</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="identifier">v</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span> <span class="special">)</span>
+ <span class="identifier">res</span><span class="special">+=</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">sqrt</span><span class="special">(</span> <span class="identifier">res</span><span class="special">+</span><span class="number">123.456L</span><span class="special">+</span><span class="identifier">i</span> <span class="special">);</span> <span class="comment">// burn some time
+</span> <span class="keyword">if</span> <span class="special">(</span><span class="identifier">v</span><span class="special">==</span><span class="number">0</span><span class="special">)</span> <span class="keyword">return</span><span class="special">;</span>
+
+ <span class="keyword">if</span> <span class="special">(</span><span class="identifier">v</span><span class="special">%(</span><span class="identifier">n</span><span class="special">-</span><span class="number">1</span><span class="special">)==</span><span class="number">0</span><span class="special">)</span> <span class="identifier">fn</span><span class="special">-</span><span class="number">1</span><span class="special">(</span><span class="identifier">v</span><span class="special">-</span><span class="number">1</span><span class="special">);</span>
+ <span class="keyword">if</span> <span class="special">(</span><span class="identifier">v</span><span class="special">%(</span><span class="identifier">n</span><span class="special">-</span><span class="number">2</span><span class="special">)==</span><span class="number">0</span><span class="special">)</span> <span class="identifier">fn</span><span class="special">-</span><span class="number">2</span><span class="special">(</span><span class="identifier">v</span><span class="special">-</span><span class="number">1</span><span class="special">);</span>
+ <span class="special">...</span>
+ <span class="identifier">f1</span><span class="special">(</span><span class="identifier">v</span><span class="special">-</span><span class="number">1</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+<p>
+ This gives a variable number in nesting reporting depending on the parameter,
+ with a variable lifetime.
+ </p>
+<a name="boost_chrono_stopwatches.appendices.perf.single_threaded_recursive_function"></a><h5>
+<a name="idp19885856"></a>
+ <a class="link" href="appendices.html#boost_chrono_stopwatches.appendices.perf.single_threaded_recursive_function">Single-Threaded
+ Recursive function</a>
+ </h5>
+<p>
+ We have run the same program and changed how the reporting is done.
+ </p>
+<p>
+ The programm creates two thread of execution. the thread entry point calls
+ a function which makes some calculation depending on its parameter and call
+ recursivelly itself decreasing the parameter.
+ </p>
+<p>
+ NONE: no report is done on the inner function HIGH: every call to the recursive
+ function is reported using an stopclock SUSPEND: every call to the recursive
+ function is reported using a using an stopclock on a suspendible clock ACCU:
+ every call to the recursive function is tracked using a stopclock_accumulator
+ </p>
+<p>
+ We have run the programm with two different clocks, high_resolution_clock
+ and thread_clock.
+ </p>
+<a name="boost_chrono_stopwatches.appendices.perf.multi_threaded_recursive_function"></a><h5>
+<a name="idp19890528"></a>
+ <a class="link" href="appendices.html#boost_chrono_stopwatches.appendices.perf.multi_threaded_recursive_function">Multi-Threaded
+ Recursive function</a>
+ </h5>
+<p>
+ We have run the same program and changed how the reporting is done.
+ </p>
+<p>
+ The programm creates two thread of execution. the thread entry point calls
+ a function which makes some calculation depending on its parameter and call
+ recursivelly itself decreasing the parameter.
+ </p>
+<p>
+ NONE: no report is done on the inner function HIGH: every call to the recursive
+ function is reported using an stopclock SUSPEND: every call to the recursive
+ function is reported using a using an stopclock on a suspendible clock ACCU:
+ every call to the recursive function is tracked using a stopclock_accumulator
+ </p>
+<p>
+ We have run the programm with two different clocks, high_resolution_clock
+ and thread_clock.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_chrono_stopwatches.appendices.todo"></a><a class="link" href="appendices.html#boost_chrono_stopwatches.appendices.todo" title="Appendix I: Future plans">Appendix I:
+ Future plans</a>
+</h3></div></div></div>
+<a name="boost_chrono_stopwatches.appendices.todo.tasks_to_do"></a><h5>
+<a name="idp19897008"></a>
+ <a class="link" href="appendices.html#boost_chrono_stopwatches.appendices.todo.tasks_to_do">Tasks
+ to do</a>
+ </h5>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ Complete documentation
+ </li>
+<li class="listitem">
+ Fully implement error handling, with test cases.
+ </li>
+<li class="listitem">
+ Fix open isues.
+ </li>
+</ul></div>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2009 -2011 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="reference.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a>
+</div>
+</body>
+</html>

Added: sandbox/stopwatches/libs/chrono/stopwatches/doc/html/boost_chrono_stopwatches/overview.html
==============================================================================
--- (empty file)
+++ sandbox/stopwatches/libs/chrono/stopwatches/doc/html/boost_chrono_stopwatches/overview.html 2011-09-11 08:43:58 EDT (Sun, 11 Sep 2011)
@@ -0,0 +1,210 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Overview</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.0">
+<link rel="home" href="../index.html" title="Boost.Chrono.Stopwatches 0.3.0">
+<link rel="up" href="../index.html" title="Boost.Chrono.Stopwatches 0.3.0">
+<link rel="prev" href="../index.html" title="Boost.Chrono.Stopwatches 0.3.0">
+<link rel="next" href="users_guide.html" title="Users'Guide">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../index.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="users_guide.html"><img src="../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_chrono_stopwatches.overview"></a><a class="link" href="overview.html" title="Overview">Overview</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">Motivation</span></dt>
+<dt><span class="section">Description</span></dt>
+</dl></div>
+<a name="boost_chrono_stopwatches.overview.how_to_use_this_documentation"></a><h4>
+<a name="idp13414784"></a>
+ <a class="link" href="overview.html#boost_chrono_stopwatches.overview.how_to_use_this_documentation">How
+ to Use This Documentation</a>
+ </h4>
+<p>
+ This documentation makes use of the following naming and formatting conventions.
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ Code is in <code class="computeroutput"><span class="identifier">fixed</span> <span class="identifier">width</span>
+ <span class="identifier">font</span></code> and is syntax-highlighted.
+ </li>
+<li class="listitem">
+ Replaceable text that you will need to supply is in <em class="replaceable"><code>italics</code></em>.
+ </li>
+<li class="listitem">
+ Free functions are rendered in the code font followed by (), as in <code class="computeroutput"><span class="identifier">free_function</span><span class="special">()</span></code>.
+ </li>
+<li class="listitem">
+ If a name refers to a class template, it is specified like this: <code class="computeroutput"><span class="identifier">class_template</span><span class="special">&lt;&gt;</span></code>;
+ that is, it is in code font and its name is followed by <code class="computeroutput"><span class="special">&lt;&gt;</span></code>
+ to indicate that it is a class template.
+ </li>
+<li class="listitem">
+ If a name refers to a function-like macro, it is specified like this:
+ <code class="computeroutput"><span class="identifier">MACRO</span><span class="special">()</span></code>;
+ that is, it is uppercase in code font and its name is followed by <code class="computeroutput"><span class="special">()</span></code> to indicate that it is a function-like
+ macro. Object-like macros appear without the trailing <code class="computeroutput"><span class="special">()</span></code>.
+ </li>
+<li class="listitem">
+ Names that refer to <span class="emphasis"><em>concepts</em></span> in the generic programming
+ sense are specified in CamelCase.
+ </li>
+</ul></div>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ In addition, notes such as this one specify non-essential information that
+ provides additional background or rationale.
+ </p></td></tr>
+</table></div>
+<p>
+ Finally, you can mentally add the following to any code fragments in this document:
+ </p>
+<pre class="programlisting"><span class="comment">// Include all of Stopwatches files
+</span><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">;</span>
+</pre>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_chrono_stopwatches.overview.motivation"></a><a class="link" href="overview.html#boost_chrono_stopwatches.overview.motivation" title="Motivation">Motivation</a>
+</h3></div></div></div>
+<a name="boost_chrono_stopwatches.overview.motivation.measuring_elapsed_time"></a><h5>
+<a name="idp13444944"></a>
+ <a class="link" href="overview.html#boost_chrono_stopwatches.overview.motivation.measuring_elapsed_time">Measuring
+ elapsed time</a>
+ </h5>
+<p>
+ Knowing how long a program, a function or a specific code block takes to
+ execute is useful in both test and production environments. <span class="bold"><strong>Boost.Chrono.Stopwatches</strong></span>
+ introduces the <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req" title="Stopwatch Requirements"><code class="computeroutput"><span class="identifier">Stopwatch</span></code></a> concept which is a mechanism
+ to measure the elapsed time. A Stopwatch allows to start, stop, suspend and
+ resume measuring the elapsed time. <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp.stopwatch" title="Template Class stopwatch&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch</span></code></a><code class="computeroutput"><span class="special">&lt;&gt;</span></code>
+ is the basic model of <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req" title="Stopwatch Requirements"><code class="computeroutput"><span class="identifier">Stopwatch</span></code></a>.
+ </p>
+<a name="boost_chrono_stopwatches.overview.motivation.reporting_elapsed_time"></a><h5>
+<a name="idp13453456"></a>
+ <a class="link" href="overview.html#boost_chrono_stopwatches.overview.motivation.reporting_elapsed_time">Reporting
+ elapsed time</a>
+ </h5>
+<p>
+ It is often necessary to report elapsed time on a user display or in a log
+ file. <a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopwatch_reporter_hpp.stopwatch_reporter" title="Template Class stopwatch_reporter&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch_reporter</span></code></a>&lt;&gt; provides
+ a runtime reporting mechanism for this purpose which can be invoked in just
+ one line of code.
+ </p>
+<pre class="programlisting"><span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">;</span>
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopwatch_reporter_hpp.stopwatch_reporter" title="Template Class stopwatch_reporter&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch_reporter</span></code></a><span class="special">&lt;</span><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp.stopwatch" title="Template Class stopwatch&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch</span></code></a><span class="special">&lt;</span><span class="identifier">process_cpu_clock</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">_</span><span class="special">;</span>
+ <span class="comment">// ...
+</span><span class="special">}</span>
+</pre>
+<p>
+ Will produce the following output
+ </p>
+<pre class="programlisting"><span class="identifier">real</span> <span class="number">0.034</span><span class="identifier">s</span><span class="special">,</span> <span class="identifier">cpu</span> <span class="number">0.031</span><span class="identifier">s</span> <span class="special">(</span><span class="number">93.0</span><span class="special">%),</span> <span class="identifier">user</span> <span class="number">0.031</span><span class="identifier">s</span><span class="special">,</span> <span class="identifier">system</span> <span class="number">0.000</span><span class="identifier">s</span>
+</pre>
+<p>
+ As this is one of the expression more commonly use, the library provides
+ a stopclock shortcut so the preceding can be writen as
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_hpp.stopclock" title="Template Class stopclock&lt;&gt;"><code class="computeroutput"><span class="identifier">stopclock</span></code></a><span class="special">&lt;&gt;</span> <span class="identifier">_</span><span class="special">;</span>
+ <span class="comment">// ...
+</span><span class="special">}</span>
+</pre>
+<a name="boost_chrono_stopwatches.overview.motivation.how_reliable_are_these_measures_"></a><h5>
+<a name="idp13489040"></a>
+ <a class="link" href="overview.html#boost_chrono_stopwatches.overview.motivation.how_reliable_are_these_measures_">How
+ reliable are these measures?</a>
+ </h5>
+<p>
+ There are a number of things that can lead to unreliable measurement (see
+ <a class="link" href="appendices.html#boost_chrono_stopwatches.appendices.rationale" title="Appendix B: Rationale">here</a>
+ for more details), but they mostly amount to reporting overhead. Boost.Chrono
+ provides two ways to improve reliability of time measurements. A <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_accumulator_hpp.stopwatch_accumulator" title="Template Class stopwatch_accumulator&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch_accumulator</span></code></a> only reports
+ statistics once all measurements have been acquired, which removes reporting
+ overhead from the measurements. The other approach is to use a <a class="link" href="reference.html#boost_chrono_stopwatches.reference.other_clocks.suspendible_clock_req" title="SuspendibleClock Requirements"><code class="computeroutput"><span class="identifier">SuspendibleClock</span></code></a> such that the reporting
+ overhead can be ignored by suspending elapsed time tracking during reporting
+ operations
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_chrono_stopwatches.overview.description"></a><a class="link" href="overview.html#boost_chrono_stopwatches.overview.description" title="Description">Description</a>
+</h3></div></div></div>
+<p>
+ On top of the standard facilities of <span class="bold"><strong>Boost.Chrono</strong></span>,
+ <span class="bold"><strong>Boost.Chrono.Stopwatches</strong></span> provides:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<p class="simpara">
+ Stopwatches: A facility to measure elapsed time with the ability to start,
+ stop, suspend, or resume measurement.
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="circle">
+<li class="listitem">
+ <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req" title="Stopwatch Requirements"><code class="computeroutput"><span class="identifier">Stopwatch</span></code></a> concept
+ </li>
+<li class="listitem">
+ Scoped helper classes allowing to pairwise start/stop operations,
+ suspend/resume and resume/suspend a <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req" title="Stopwatch Requirements"><code class="computeroutput"><span class="identifier">Stopwatch</span></code></a>.
+ </li>
+<li class="listitem">
+ <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp.stopwatch" title="Template Class stopwatch&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch</span></code></a>, model of <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req" title="Stopwatch Requirements"><code class="computeroutput"><span class="identifier">Stopwatch</span></code></a> capturing elapsed
+ <code class="computeroutput"><span class="identifier">Clock</span></code> times.
+ </li>
+<li class="listitem">
+ <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_accumulator_hpp.stopwatch_accumulator" title="Template Class stopwatch_accumulator&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch_accumulator</span></code></a>, model
+ of <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req" title="Stopwatch Requirements"><code class="computeroutput"><span class="identifier">Stopwatch</span></code></a> capturing cummulated
+ elapsed Clock times.
+ </li>
+</ul></div>
+</li>
+<li class="listitem">
+<p class="simpara">
+ Stopclocks: a complete time reporting package that can be invoked in
+ a single line of code.
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="circle">
+<li class="listitem">
+ <a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopwatch_reporter_hpp.stopwatch_reporter" title="Template Class stopwatch_reporter&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch_reporter</span></code></a>, convenient
+ reporting to an output stream (including wide char streams) of the
+ elapsed time of models of <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req" title="Stopwatch Requirements"><code class="computeroutput"><span class="identifier">Stopwatch</span></code></a> results.
+ </li>
+<li class="listitem">
+ <a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_hpp.stopclock" title="Template Class stopclock&lt;&gt;"><code class="computeroutput"><span class="identifier">stopclock</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;</span></code></a>
+ shortcut of <code class="computeroutput"><a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopwatch_reporter_hpp.stopwatch_reporter" title="Template Class stopwatch_reporter&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch_reporter</span></code></a><span class="special">&lt;</span><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp.stopwatch" title="Template Class stopwatch&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch</span></code></a><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;&gt;</span></code>
+ </li>
+</ul></div>
+</li>
+</ul></div>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2009 -2011 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../index.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="users_guide.html"><img src="../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/stopwatches/libs/chrono/stopwatches/doc/html/boost_chrono_stopwatches/reference.html
==============================================================================
--- (empty file)
+++ sandbox/stopwatches/libs/chrono/stopwatches/doc/html/boost_chrono_stopwatches/reference.html 2011-09-11 08:43:58 EDT (Sun, 11 Sep 2011)
@@ -0,0 +1,3616 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Reference</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.0">
+<link rel="home" href="../index.html" title="Boost.Chrono.Stopwatches 0.3.0">
+<link rel="up" href="../index.html" title="Boost.Chrono.Stopwatches 0.3.0">
+<link rel="prev" href="users_guide.html" title="Users'Guide">
+<link rel="next" href="appendices.html" title="Appendices">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="users_guide.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="appendices.html"><img src="../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_chrono_stopwatches.reference"></a><a class="link" href="reference.html" title="Reference">Reference </a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches_stopwatches_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.other_clocks">Other
+ clocks</a></span></dt>
+<dd><dl>
+<dt><span class="section">SuspendibleClock Requirements</span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.other_clocks.scoped_suspend_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">scoped_suspend</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.other_clocks.suspendible_clock_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">suspendible_clock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section">Stopwatches</span></dt>
+<dd><dl>
+<dt><span class="section">Stopwatch Requirements</span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.lightweight_stopwatch_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">lightweight_stopwatch</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopwatch</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_accumulator_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopwatch_accumulator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_scoped_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopwatch_scoped</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters">Stopwatch
+ Reporters</a></span></dt>
+<dd><dl>
+<dt><span class="section">Formatter Requirements</span></dt>
+<dt><span class="section">Formatter related traits</span></dt>
+<dt><span class="section">Reporter Requirements</span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters.stopwatch_reporter_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopwatch_reporter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopclock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_accumulator_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopclock_accumulator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters.scoped_stopclock_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">scoped_stopclock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.formatters">Stopwatch
+ Formatters</a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.formatters.stopwatch_formatter_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopwatch_formatter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.formatters.stopwatch_accumulator_formatter_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopwatch_accumulator_formatter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.formatters.time_formatter_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">time_formatter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.formatters.stopwatch_accumulator_time_formatter_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopwatch_accumulator_time_formatter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.formatters.t24_hours_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">t24_hours</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.formatters.t24_hours_formatter_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">t24_hours_formatter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+</dl></dd>
+</dl></div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_chrono_stopwatches.reference.stopwatches_hpp"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches_hpp" title="Header &lt;boost/chrono/stopwatches.hpp&gt;">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h3></div></div></div>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_chrono_stopwatches.reference.stopwatches_stopwatches_hpp"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches_stopwatches_hpp" title="Header &lt;boost/chrono/stopwatches/stopwatches.hpp&gt;">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h3></div></div></div>
+<p>
+ This file include all the stopwatches related files except the suspendible
+ related files.
+ </p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">scoped_stopclock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopclock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopclock_accumulator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopwatch</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopwatch_accumulator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopwatch_accumulator_formatter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopwatch_accumulator_time_formatter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopwatch_formatter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopwatch_reporter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopwatch_scoped</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">time_formatter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">t24_hours</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">t24_hours_formatter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_chrono_stopwatches.reference.other_clocks"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.other_clocks" title="Other clocks">Other
+ clocks</a>
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">SuspendibleClock Requirements</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.other_clocks.suspendible_clock_req.suspend">Static
+ Member Function <code class="computeroutput"><span class="identifier">suspend</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.other_clocks.suspendible_clock_req.resume">Static
+ Member Function <code class="computeroutput"><span class="identifier">resume</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.other_clocks.suspendible_clock_req.suspended">Static
+ Member Function <code class="computeroutput"><span class="identifier">suspended</span><span class="special">()</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.other_clocks.scoped_suspend_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">scoped_suspend</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.other_clocks.scoped_suspend_hpp.is_suspendible">Meta
+ Function Class <code class="computeroutput"><span class="identifier">is_suspendible</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.other_clocks.scoped_suspend_hpp.scoped_suspend">Template
+ Class <code class="computeroutput"><span class="identifier">scoped_suspend</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.other_clocks.suspendible_clock_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">suspendible_clock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl><dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.other_clocks.suspendible_clock_hpp.suspendible_clock">Template
+ Class <code class="computeroutput"><span class="identifier">suspendible_clock</span><span class="special">&lt;&gt;</span></code></a></span></dt></dl></dd>
+</dl></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono_stopwatches.reference.other_clocks.suspendible_clock_req"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.other_clocks.suspendible_clock_req" title="SuspendibleClock Requirements"><code class="computeroutput"><span class="identifier">SuspendibleClock</span></code> Requirements</a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.other_clocks.suspendible_clock_req.suspend">Static
+ Member Function <code class="computeroutput"><span class="identifier">suspend</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.other_clocks.suspendible_clock_req.resume">Static
+ Member Function <code class="computeroutput"><span class="identifier">resume</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.other_clocks.suspendible_clock_req.suspended">Static
+ Member Function <code class="computeroutput"><span class="identifier">suspended</span><span class="special">()</span></code></a></span></dt>
+</dl></div>
+<p>
+ A <code class="computeroutput"><span class="identifier">SuspendibleClock</span></code> is a
+ Clock that in addition supports <code class="computeroutput"><span class="identifier">suspend</span></code>/<code class="computeroutput"><span class="identifier">resume</span></code> operations.
+ </p>
+<p>
+ A <code class="computeroutput"><span class="identifier">SuspendibleClock</span></code> must
+ meet the requirements in the following Table.
+ </p>
+<p>
+ In this table <code class="computeroutput"><span class="identifier">C</span></code> denote
+ <code class="computeroutput"><span class="identifier">clock</span></code> types.
+ </p>
+<div class="table">
+<a name="boost_chrono_stopwatches.reference.other_clocks.suspendible_clock_req.suspendibleclock_requirements"></a><p class="title"><b>Table&#160;1.&#160;SuspendibleClock Requirements</b></p>
+<div class="table-contents"><table class="table" summary="SuspendibleClock Requirements">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ expression
+ </p>
+ </th>
+<th>
+ <p>
+ return type
+ </p>
+ </th>
+<th>
+ <p>
+ operational semantics
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">C</span><span class="special">::</span><span class="identifier">suspend</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">void</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Suspends the time counting of the clock C.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">C</span><span class="special">::</span><span class="identifier">resume</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">void</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Resumes the time counting of the clock C.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">C</span><span class="special">::</span><span class="identifier">suspended</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">duration</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Returns the delay(duration during which the clock has been suspended.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<br class="table-break"><div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.other_clocks.suspendible_clock_req.suspend"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.other_clocks.suspendible_clock_req.suspend" title="Static Member Function suspend()">Static
+ Member Function <code class="computeroutput"><span class="identifier">suspend</span><span class="special">()</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">suspend</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+</pre>
+<p>
+ <span class="bold"><strong>Effect:</strong></span> Suspends the SuspendibleClock.
+ </p>
+<p>
+ <span class="bold"><strong>Throw:</strong></span> Any exception the <code class="computeroutput"><span class="identifier">Clock</span><span class="special">::</span><span class="identifier">now</span><span class="special">(</span><span class="identifier">ec</span><span class="special">)</span></code>
+ function can throw. Otherwise <code class="computeroutput"><span class="identifier">ec</span></code>
+ is set with the correspoding error code set by <code class="computeroutput"><span class="identifier">Clock</span><span class="special">::</span><span class="identifier">now</span><span class="special">(</span><span class="identifier">ec</span><span class="special">)</span></code>.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.other_clocks.suspendible_clock_req.resume"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.other_clocks.suspendible_clock_req.resume" title="Static Member Function resume()">Static
+ Member Function <code class="computeroutput"><span class="identifier">resume</span><span class="special">()</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">resume</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+</pre>
+<p>
+ <span class="bold"><strong>Effect:</strong></span> Resumes the <code class="computeroutput"><span class="identifier">SuspendibleClock</span></code>.
+ </p>
+<p>
+ <span class="bold"><strong>Throw:</strong></span> Any exception the <code class="computeroutput"><span class="identifier">Clock</span><span class="special">::</span><span class="identifier">now</span><span class="special">(</span><span class="identifier">ec</span><span class="special">)</span></code>
+ can throw. Otherwise <code class="computeroutput"><span class="identifier">ec</span></code>
+ is set with the correspoding error code set by <code class="computeroutput"><span class="identifier">Clock</span><span class="special">::</span><span class="identifier">now</span><span class="special">(</span><span class="identifier">ec</span><span class="special">)</span></code>.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.other_clocks.suspendible_clock_req.suspended"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.other_clocks.suspendible_clock_req.suspended" title="Static Member Function suspended()">Static
+ Member Function <code class="computeroutput"><span class="identifier">suspended</span><span class="special">()</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="identifier">duration</span> <span class="identifier">suspended</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+</pre>
+<p>
+ <span class="bold"><strong>Returns:</strong></span> the cumalative elapsed duration
+ during which the <code class="computeroutput"><span class="identifier">SuspendibleClock</span></code>
+ has been suspendeed.
+ </p>
+<p>
+ <span class="bold"><strong>Throw:</strong></span> Any exception the Clock::now
+ function can throw if <code class="computeroutput"><span class="identifier">ec</span> <span class="special">==</span> <span class="identifier">throws</span><span class="special">()</span></code>. Otherwise <code class="computeroutput"><span class="identifier">ec</span></code>
+ is set with the correspoding error code set by <code class="computeroutput"><span class="identifier">Clock</span><span class="special">::</span><span class="identifier">now</span><span class="special">(</span><span class="identifier">ec</span><span class="special">)</span></code>.
+ </p>
+</div>
+<p>
+ Models of <code class="computeroutput"><span class="identifier">SuspendibleClock</span></code>:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+ <a class="link" href="reference.html#boost_chrono_stopwatches.reference.other_clocks.suspendible_clock_hpp.suspendible_clock" title="Template Class suspendible_clock&lt;&gt;"><code class="computeroutput"><span class="identifier">suspendible_clock</span></code></a>
+ </li></ul></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono_stopwatches.reference.other_clocks.scoped_suspend_hpp"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.other_clocks.scoped_suspend_hpp" title="Header &lt;boost/chrono/stopwatches/scoped_suspend.hpp&gt;">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">scoped_suspend</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.other_clocks.scoped_suspend_hpp.is_suspendible">Meta
+ Function Class <code class="computeroutput"><span class="identifier">is_suspendible</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.other_clocks.scoped_suspend_hpp.scoped_suspend">Template
+ Class <code class="computeroutput"><span class="identifier">scoped_suspend</span></code></a></span></dt>
+</dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">&gt;</span> <span class="keyword">struct</span> <span class="identifier">is_suspendible</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">scoped_suspend</span><span class="special">;</span>
+<span class="special">}}</span>
+</pre>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.other_clocks.scoped_suspend_hpp.is_suspendible"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.other_clocks.scoped_suspend_hpp.is_suspendible" title="Meta Function Class is_suspendible">Meta
+ Function Class <code class="computeroutput"><span class="identifier">is_suspendible</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">is_suspendible</span> <span class="special">:</span> <span class="identifier">mpl</span><span class="special">::</span> <span class="identifier">false_</span> <span class="special">{};</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.other_clocks.scoped_suspend_hpp.scoped_suspend"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.other_clocks.scoped_suspend_hpp.scoped_suspend" title="Template Class scoped_suspend">Template
+ Class <code class="computeroutput"><span class="identifier">scoped_suspend</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">scoped_suspend</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="identifier">scoped_suspend</span><span class="special">(</span><span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">())</span> <span class="special">{}</span>
+ <span class="special">~</span><span class="identifier">scoped_suspend</span><span class="special">()</span> <span class="special">{}</span>
+<span class="keyword">private</span><span class="special">:</span>
+ <span class="identifier">scoped_suspend</span><span class="special">();</span> <span class="comment">// = delete;
+</span> <span class="identifier">scoped_suspend</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">scoped_suspend</span><span class="special">&amp;);</span> <span class="comment">// = delete;
+</span> <span class="identifier">scoped_suspend</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">scoped_suspend</span><span class="special">&amp;);</span> <span class="comment">// = delete;
+</span><span class="special">};</span>
+</pre>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono_stopwatches.reference.other_clocks.suspendible_clock_hpp"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.other_clocks.suspendible_clock_hpp" title="Header &lt;boost/chrono/stopwatches/suspendible_clock.hpp&gt;">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">suspendible_clock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.other_clocks.suspendible_clock_hpp.suspendible_clock">Template
+ Class <code class="computeroutput"><span class="identifier">suspendible_clock</span><span class="special">&lt;&gt;</span></code></a></span></dt></dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">&gt;</span>
+ <span class="keyword">class</span> <span class="identifier">suspendible_clock</span><span class="special">;</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">is_suspendible</span><span class="special">&lt;</span><span class="identifier">suspendible_clock</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;</span> <span class="special">&gt;;</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">&gt;</span>
+ <span class="keyword">class</span> <span class="identifier">scoped_suspend</span><span class="special">&lt;</span><span class="identifier">suspendible_clock</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;</span> <span class="special">&gt;;</span>
+
+<span class="special">}}</span>
+</pre>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.other_clocks.suspendible_clock_hpp.suspendible_clock"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.other_clocks.suspendible_clock_hpp.suspendible_clock" title="Template Class suspendible_clock&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">suspendible_clock</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.other_clocks.suspendible_clock_hpp.suspendible_clock._scoped_suspend__specialization_for__suspendible_clock___"><code class="computeroutput"><span class="identifier">scoped_suspend</span></code> specialization for
+ <code class="computeroutput"><span class="identifier">suspendible_clock</span><span class="special">&lt;&gt;</span></code></a></span></dt></dl></div>
+<p>
+ Given a <code class="computeroutput"><span class="identifier">Clock</span></code>, <a class="link" href="reference.html#boost_chrono_stopwatches.reference.other_clocks.suspendible_clock_hpp.suspendible_clock" title="Template Class suspendible_clock&lt;&gt;"><code class="computeroutput"><span class="identifier">suspendible_clock</span></code></a> &lt; <code class="computeroutput"><span class="identifier">Clock</span></code>&gt; is a model of <a class="link" href="reference.html#boost_chrono_stopwatches.reference.other_clocks.suspendible_clock_req" title="SuspendibleClock Requirements"><code class="computeroutput"><span class="identifier">SuspendibleClock</span></code></a>.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Clock</span> <span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">suspendible_clock</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Clock</span><span class="special">::</span><span class="identifier">duration</span> <span class="identifier">duration</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Clock</span><span class="special">::</span><span class="identifier">rep</span> <span class="identifier">rep</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Clock</span><span class="special">::</span><span class="identifier">period</span> <span class="identifier">period</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">chrono</span><span class="special">::</span> <code class="computeroutput"><span class="identifier">time_point</span></code><span class="special">&lt;</span><span class="identifier">suspendible_clock</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">time_point</span><span class="special">;</span>
+ <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">bool</span> <span class="identifier">is_steady</span> <span class="special">=</span> <span class="identifier">Clock</span><span class="special">::</span><span class="identifier">is_steady</span><span class="special">;</span>
+
+ <span class="keyword">static</span> <span class="identifier">time_point</span> <span class="identifier">now</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">suspend</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">resume</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">static</span> <span class="identifier">duration</span> <span class="identifier">suspended</span><span class="special">(</span><span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">());</span>
+<span class="special">};</span>
+</pre>
+<div class="section">
+<div class="titlepage"><div><div><h6 class="title">
+<a name="boost_chrono_stopwatches.reference.other_clocks.suspendible_clock_hpp.suspendible_clock._scoped_suspend__specialization_for__suspendible_clock___"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.other_clocks.suspendible_clock_hpp.suspendible_clock._scoped_suspend__specialization_for__suspendible_clock___" title="scoped_suspend specialization for suspendible_clock&lt;&gt;"><code class="computeroutput"><span class="identifier">scoped_suspend</span></code> specialization for
+ <code class="computeroutput"><span class="identifier">suspendible_clock</span><span class="special">&lt;&gt;</span></code></a>
+</h6></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">scoped_suspend</span><span class="special">&lt;</span><span class="identifier">suspendible_clock</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="identifier">scoped_suspend</span><span class="special">(</span><span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">());</span>
+ <span class="special">~</span><span class="identifier">scoped_suspend</span><span class="special">();</span>
+<span class="special">};</span>
+</pre>
+</div>
+</div>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_chrono_stopwatches.reference.stopwatches"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches" title="Stopwatches">Stopwatches</a>
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">Stopwatch Requirements</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req.start">Member
+ Function <code class="computeroutput"><span class="identifier">start</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req.stop">Member
+ Function <code class="computeroutput"><span class="identifier">stop</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req.suspend">Member
+ Function <code class="computeroutput"><span class="identifier">suspend</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req.resume">Member
+ Function <code class="computeroutput"><span class="identifier">resume</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req.restart">Member
+ Function <code class="computeroutput"><span class="identifier">restart</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req.elapsed">Member
+ Function <code class="computeroutput"><span class="identifier">elapsed</span><span class="special">()</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.lightweight_stopwatch_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">lightweight_stopwatch</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.lightweight_stopwatch_hpp.dont_start_t">Class
+ <code class="computeroutput"><span class="identifier">dont_start_t</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.lightweight_stopwatch_hpp.lightweight_stopwatch">Template
+ Class <code class="computeroutput"><span class="identifier">lightweight_stopwatch</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopwatch</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp.stopwatch">Template
+ Class <code class="computeroutput"><span class="identifier">stopwatch</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp.spec"><code class="computeroutput"><span class="identifier">stopwatch_reporter_default_formatter</span></code>
+ Specialization</a></span></dt>
+<dt><span class="section">stopwatch useful typedefs</span></dt>
+</dl></dd>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_accumulator_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopwatch_accumulator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_accumulator_hpp.stopwatch_accumulator">Template
+ Class <code class="computeroutput"><span class="identifier">stopwatch_accumulator</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_accumulator_hpp.spec"><code class="computeroutput"><span class="identifier">stopwatch_reporter_default_formatter</span></code>
+ Specialization</a></span></dt>
+<dt><span class="section">stopwatch_accumulator useful typedefs</span></dt>
+</dl></dd>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_scoped_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopwatch_scoped</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_scoped_hpp.stopwatch_runner">Template
+ Class <code class="computeroutput"><span class="identifier">stopwatch_runner</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_scoped_hpp.stopwatch_suspender">Template
+ Class <code class="computeroutput"><span class="identifier">stopwatch_suspender</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_scoped_hpp.stopwatch_resumer">Template
+ Class <code class="computeroutput"><span class="identifier">stopwatch_resumer</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+</dl></dd>
+</dl></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono_stopwatches.reference.stopwatches.stopwatch_req"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req" title="Stopwatch Requirements"><code class="computeroutput"><span class="identifier">Stopwatch</span></code> Requirements</a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req.start">Member
+ Function <code class="computeroutput"><span class="identifier">start</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req.stop">Member
+ Function <code class="computeroutput"><span class="identifier">stop</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req.suspend">Member
+ Function <code class="computeroutput"><span class="identifier">suspend</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req.resume">Member
+ Function <code class="computeroutput"><span class="identifier">resume</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req.restart">Member
+ Function <code class="computeroutput"><span class="identifier">restart</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req.elapsed">Member
+ Function <code class="computeroutput"><span class="identifier">elapsed</span><span class="special">()</span></code></a></span></dt>
+</dl></div>
+<p>
+ A Stopwatch measure the amount of time elapsed from a start point in time
+ to the stop point time or the accumulation of them. Stopwatches can in
+ addition be restarted, suspended and resumed.
+ </p>
+<p>
+ A Stopwatch must meet the requirements in the following table. In this
+ table <code class="computeroutput"><span class="identifier">S</span></code>, <code class="computeroutput"><span class="identifier">S1</span></code> and <code class="computeroutput"><span class="identifier">S2</span></code>
+ denote Stopwatches types. <code class="computeroutput"><span class="identifier">s</span></code>
+ is an instance of <code class="computeroutput"><span class="identifier">S</span></code>.
+ </p>
+<div class="table">
+<a name="boost_chrono_stopwatches.reference.stopwatches.stopwatch_req.stopwatch_requirements"></a><p class="title"><b>Table&#160;2.&#160;Stopwatch Requirements</b></p>
+<div class="table-contents"><table class="table" summary="Stopwatch Requirements">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ expression
+ </p>
+ </th>
+<th>
+ <p>
+ return type
+ </p>
+ </th>
+<th>
+ <p>
+ operational semantics
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">S</span><span class="special">::</span><span class="identifier">clock</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ A model of <code class="computeroutput"><span class="identifier">Clock</span></code>.
+ </p>
+ </td>
+<td>
+ <p>
+ The clock associated to this Stopwatch.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">S</span><span class="special">::</span><span class="identifier">duration</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">S</span><span class="special">::</span><span class="identifier">clock</span><span class="special">::</span><span class="identifier">duration</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The <code class="computeroutput"><span class="identifier">duration</span></code>
+ type of the <code class="computeroutput"><span class="identifier">clock</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">S</span><span class="special">::</span><span class="identifier">time_point</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">S</span><span class="special">::</span><span class="identifier">clock</span><span class="special">::</span><span class="identifier">time_point</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The <code class="computeroutput"><span class="identifier">time_point</span></code>
+ type of the <code class="computeroutput"><span class="identifier">clock</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">S</span><span class="special">::</span><span class="identifier">scoped_run</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">stopwatch_runner</span><span class="special">&lt;</span><span class="identifier">stopwatch</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;</span> <span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ RAI which <code class="computeroutput"><span class="identifier">start</span></code>/<code class="computeroutput"><span class="identifier">stop</span></code> the <code class="computeroutput"><span class="identifier">stopwatch</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">S</span><span class="special">::</span><span class="identifier">scoped_suspend</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">stopwatch_suspender</span><span class="special">&lt;</span><span class="identifier">stopwatch</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;</span> <span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ RAI which <code class="computeroutput"><span class="identifier">suspend</span></code>/<code class="computeroutput"><span class="identifier">resume</span></code> the <code class="computeroutput"><span class="identifier">stopwatch</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">S</span><span class="special">::</span><span class="identifier">scoped_resume</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">stopwatch_resumer</span><span class="special">&lt;</span><span class="identifier">stopwatch</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;</span> <span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ RAI which <code class="computeroutput"><span class="identifier">resume</span></code>/<code class="computeroutput"><span class="identifier">suspend</span></code> the <code class="computeroutput"><span class="identifier">stopwatch</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">s</span><span class="special">.</span><span class="identifier">start</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">S</span><span class="special">::</span><span class="identifier">time_point</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ starts a Stopwatch.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">s</span><span class="special">.</span><span class="identifier">restart</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">S</span><span class="special">::</span><span class="identifier">duration</span><span class="special">,</span><span class="identifier">S</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">&gt;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ restarts a Stopwatch.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">s</span><span class="special">.</span><span class="identifier">stop</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">S</span><span class="special">::</span><span class="identifier">duration</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ stops a Stopwatch.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">s</span><span class="special">.</span><span class="identifier">resume</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">S</span><span class="special">::</span><span class="identifier">time_point</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ resume a Stopwatch.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">s</span><span class="special">.</span><span class="identifier">suspend</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">S</span><span class="special">::</span><span class="identifier">duration</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ suspends a Stopwatch.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">s</span><span class="special">.</span><span class="identifier">elapsed</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">S</span><span class="special">::</span><span class="identifier">duration</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ the elapsed time while the Stopwatch was running.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<br class="table-break"><div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.stopwatches.stopwatch_req.start"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req.start" title="Member Function start()">Member
+ Function <code class="computeroutput"><span class="identifier">start</span><span class="special">()</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="identifier">time_point</span> <span class="identifier">start</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+</pre>
+<p>
+ <span class="bold"><strong>Effect:</strong></span> Starts running the stopwatch.
+ </p>
+<p>
+ <span class="bold"><strong>Returns:</strong></span> the starting time point.
+ </p>
+<p>
+ <span class="bold"><strong>Throw:</strong></span> Any exception the <code class="computeroutput"><span class="identifier">Clock</span><span class="special">::</span><span class="identifier">now</span></code> function can throw when <code class="computeroutput"><span class="identifier">ec</span></code> is <code class="computeroutput"><span class="identifier">throws</span><span class="special">()</span></code>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.stopwatches.stopwatch_req.stop"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req.stop" title="Member Function stop()">Member
+ Function <code class="computeroutput"><span class="identifier">stop</span><span class="special">()</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="identifier">duration</span> <span class="identifier">stop</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+</pre>
+<p>
+ <span class="bold"><strong>Effect:</strong></span> Stops running the stopwatch.
+ </p>
+<p>
+ <span class="bold"><strong>Returns:</strong></span> The cummulated elapsed time.
+ </p>
+<p>
+ <span class="bold"><strong>Throw:</strong></span> Any exception the <code class="computeroutput"><span class="identifier">Clock</span><span class="special">::</span><span class="identifier">now</span></code> function can throw when <code class="computeroutput"><span class="identifier">ec</span></code> is <code class="computeroutput"><span class="identifier">throws</span><span class="special">()</span></code>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.stopwatches.stopwatch_req.suspend"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req.suspend" title="Member Function suspend()">Member
+ Function <code class="computeroutput"><span class="identifier">suspend</span><span class="special">()</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="identifier">duration</span> <span class="identifier">suspend</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+</pre>
+<p>
+ <span class="bold"><strong>Effect:</strong></span> Suspends the stopwatch.
+ </p>
+<p>
+ <span class="bold"><strong>Throw:</strong></span> Any exception the <code class="computeroutput"><span class="identifier">Clock</span><span class="special">::</span><span class="identifier">now</span></code> function can throw when <code class="computeroutput"><span class="identifier">ec</span></code> is <code class="computeroutput"><span class="identifier">throws</span><span class="special">()</span></code>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.stopwatches.stopwatch_req.resume"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req.resume" title="Member Function resume()">Member
+ Function <code class="computeroutput"><span class="identifier">resume</span><span class="special">()</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="identifier">time_point</span> <span class="identifier">resume</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+</pre>
+<p>
+ <span class="bold"><strong>Effect:</strong></span> Resumes the stopwatch.
+ </p>
+<p>
+ <span class="bold"><strong>Returns:</strong></span> the starting time point.
+ </p>
+<p>
+ <span class="bold"><strong>Throw:</strong></span> Any exception the Clock::now
+ function can throw.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.stopwatches.stopwatch_req.restart"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req.restart" title="Member Function restart()">Member
+ Function <code class="computeroutput"><span class="identifier">restart</span><span class="special">()</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="identifier">time_point</span> <span class="identifier">restart</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+</pre>
+<p>
+ <span class="bold"><strong>Effect:</strong></span> <code class="computeroutput"><span class="identifier">stop</span></code>/<code class="computeroutput"><span class="identifier">start</span></code> the stopwatch.
+ </p>
+<p>
+ <span class="bold"><strong>Returns:</strong></span> the starting time point.
+ </p>
+<p>
+ <span class="bold"><strong>Throw:</strong></span> Any exception the <code class="computeroutput"><span class="identifier">Clock</span><span class="special">::</span><span class="identifier">now</span></code> function can throw when <code class="computeroutput"><span class="identifier">ec</span></code> is <code class="computeroutput"><span class="identifier">throws</span><span class="special">()</span></code>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.stopwatches.stopwatch_req.elapsed"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req.elapsed" title="Member Function elapsed()">Member
+ Function <code class="computeroutput"><span class="identifier">elapsed</span><span class="special">()</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="identifier">duration</span> <span class="identifier">elapsed</span><span class="special">(</span><span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">())</span> <span class="keyword">const</span><span class="special">;</span>
+</pre>
+<p>
+ <span class="bold"><strong>Returns:</strong></span> the cumulated elapsed time.
+ </p>
+<p>
+ <span class="bold"><strong>Throw:</strong></span> Any exception the <code class="computeroutput"><span class="identifier">Clock</span><span class="special">::</span><span class="identifier">now</span></code> function can throw when <code class="computeroutput"><span class="identifier">ec</span></code> is <code class="computeroutput"><span class="identifier">throws</span><span class="special">()</span></code>
+ </p>
+</div>
+<p>
+ Models of <code class="computeroutput"><span class="identifier">Stopwatch</span></code>:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp.stopwatch" title="Template Class stopwatch&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch</span></code></a>
+ </li>
+<li class="listitem">
+ <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_accumulator_hpp.stopwatch_accumulator" title="Template Class stopwatch_accumulator&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch_accumulator</span></code></a>
+ </li>
+</ul></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono_stopwatches.reference.stopwatches.lightweight_stopwatch_hpp"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.lightweight_stopwatch_hpp" title="Header &lt;boost/chrono/stopwatches/lightweight_stopwatch.hpp&gt;">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">lightweight_stopwatch</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.lightweight_stopwatch_hpp.dont_start_t">Class
+ <code class="computeroutput"><span class="identifier">dont_start_t</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.lightweight_stopwatch_hpp.lightweight_stopwatch">Template
+ Class <code class="computeroutput"><span class="identifier">lightweight_stopwatch</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+</dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
+ <span class="keyword">struct</span> <span class="identifier">dont_start_t</span><span class="special">;</span>
+ <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">dont_start_t</span> <span class="identifier">dont_start</span><span class="special">;</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">=</span><span class="identifier">high_resolution_clock</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">Features</span><span class="special">=</span><span class="keyword">void</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">Weight</span><span class="special">=</span><span class="keyword">void</span>
+ <span class="special">&gt;</span> <span class="keyword">class</span> <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.lightweight_stopwatch_hpp.lightweight_stopwatch" title="Template Class lightweight_stopwatch&lt;&gt;"><code class="computeroutput"><span class="identifier">lightweight_stopwatch</span></code></a><span class="special">;</span>
+
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">&gt;</span> <span class="identifier">system_lightweight_stopwatch</span><span class="special">;</span>
+ <span class="preprocessor">#ifdef</span> <code class="computeroutput"><span class="identifier">BOOST_CHRONO_HAS_CLOCK_STEADY</span></code>
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">&gt;</span> <span class="identifier">steady_lightweight_stopwatch</span><span class="special">;</span>
+ <span class="preprocessor">#endif</span>
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">&gt;</span> <span class="identifier">high_resolution_lightweight_stopwatch</span><span class="special">;</span>
+<span class="special">}}</span>
+</pre>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.stopwatches.lightweight_stopwatch_hpp.dont_start_t"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.lightweight_stopwatch_hpp.dont_start_t" title="Class dont_start_t">Class
+ <code class="computeroutput"><span class="identifier">dont_start_t</span></code></a>
+</h5></div></div></div>
+<p>
+ Structure used to don't start a <code class="computeroutput"><span class="identifier">lightweight_stopwatch</span></code>
+ at construction time.
+ </p>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">dont_start_t</span><span class="special">;</span>
+<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">dont_start_t</span> <span class="identifier">dont_start</span><span class="special">;</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.stopwatches.lightweight_stopwatch_hpp.lightweight_stopwatch"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.lightweight_stopwatch_hpp.lightweight_stopwatch" title="Template Class lightweight_stopwatch&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">lightweight_stopwatch</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.lightweight_stopwatch_hpp.lightweight_stopwatch.c1">Constructor
+ <code class="computeroutput"><span class="identifier">lightweight_stopwatch</span><span class="special">(</span> <span class="identifier">storage</span><span class="special">&amp;,</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span>
+ <span class="special">&amp;)</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.lightweight_stopwatch_hpp.lightweight_stopwatch.c2">Constructor
+ <code class="computeroutput"><span class="identifier">lightweight_stopwatch</span><span class="special">(</span> <span class="identifier">storage</span><span class="special">&amp;,</span> <span class="identifier">dont_start_t</span>
+ <span class="special">&amp;)</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.lightweight_stopwatch_hpp.lightweight_stopwatch.get_storage">Member
+ Function <code class="computeroutput"><span class="identifier">get_storage</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.lightweight_stopwatch_hpp.lightweight_stopwatch.reset">Member
+ Function <code class="computeroutput"><span class="identifier">reset</span><span class="special">()</span></code></a></span></dt>
+</dl></div>
+<p>
+ <code class="computeroutput"><span class="identifier">lightweight_stopwatch</span><span class="special">&lt;&gt;</span></code> is a model of a <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req" title="Stopwatch Requirements"><code class="computeroutput"><span class="identifier">Stopwatch</span></code> concept</a>.
+ </p>
+<p>
+ Knowing how long a part of a program takes to execute is useful in both
+ test and production environments. A <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.lightweight_stopwatch_hpp.lightweight_stopwatch" title="Template Class lightweight_stopwatch&lt;&gt;"><code class="computeroutput"><span class="identifier">lightweight_stopwatch</span></code></a> object
+ measures elapsed time. It is recommended to use it with clocks that measure
+ wall clock rather than CPU time since the intended use is performance
+ measurement on systems where total elapsed time is more important than
+ just process or CPU time.
+ </p>
+<p>
+ The maximum measurable elapsed time depends on the Clock parameter. The
+ accuracy of timings depends on the accuracy of timing information provided
+ the Clock, and this could varies a great deal from one clock to another.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Features</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Weight</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">lightweight_stopwatch</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">Clock</span> <span class="identifier">clock</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Clock</span><span class="special">::</span><span class="identifier">duration</span> <span class="identifier">duration</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Clock</span><span class="special">::</span><span class="identifier">time_point</span> <span class="identifier">time_point</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">below</span><span class="special">&gt;</span> <span class="identifier">storage</span><span class="special">;</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">lightweight_stopwatch</span><span class="special">(</span> <span class="identifier">storage</span><span class="special">&amp;</span> <span class="identifier">st</span><span class="special">,</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="identifier">lightweight_stopwatch</span><span class="special">(</span> <span class="identifier">storage</span><span class="special">&amp;</span> <span class="identifier">st</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">dont_start_t</span><span class="special">&amp;</span> <span class="identifier">t</span> <span class="special">);</span>
+
+ <span class="special">~</span><span class="identifier">lightweight_stopwatch</span><span class="special">();</span>
+
+ <span class="identifier">time_point</span> <span class="identifier">start</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="identifier">duration</span> <span class="identifier">stop</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">duration</span><span class="special">,</span><span class="identifier">time_point</span><span class="special">&gt;</span> <span class="identifier">restart</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="identifier">duration</span> <span class="identifier">suspend</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="identifier">time_point</span> <span class="identifier">resume</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="identifier">duration</span> <span class="identifier">elapsed</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="identifier">time_point</span> <span class="identifier">now</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">void</span> <span class="identifier">reset</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="identifier">storage</span><span class="special">&amp;</span> <span class="identifier">get_storage</span><span class="special">(</span> <span class="special">);</span>
+ <span class="identifier">duration</span> <span class="identifier">lifetime</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="keyword">typedef</span> <span class="identifier">stopwatch_runner</span><span class="special">&lt;</span><span class="identifier">lightweight_stopwatch</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">scoped_run</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">stopwatch_suspender</span><span class="special">&lt;</span><span class="identifier">lightweight_stopwatch</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">scoped_suspend</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">stopwatch_resumer</span><span class="special">&lt;</span><span class="identifier">lightweight_stopwatch</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">scoped_resume</span><span class="special">;</span>
+
+<span class="special">};</span>
+</pre>
+<p>
+ <code class="computeroutput"><span class="identifier">storage</span></code> is either <code class="computeroutput"><span class="identifier">Clock</span><span class="special">::</span><span class="identifier">duration</span></code> if Features and Weight are
+ void and <code class="computeroutput"><span class="identifier">accumulators</span><span class="special">::</span><span class="identifier">accumulator_set</span><span class="special">&lt;</span><span class="keyword">typename</span>
+ <span class="identifier">Clock</span><span class="special">::</span><span class="identifier">duration</span><span class="special">::</span><span class="identifier">rep</span><span class="special">,</span> <span class="identifier">Features</span><span class="special">,</span>
+ <span class="identifier">Weight</span><span class="special">&gt;</span></code>
+ otherwise.
+ </p>
+<p>
+ Only the specificities of this class are documented here. See <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req" title="Stopwatch Requirements"><code class="computeroutput"><span class="identifier">Stopwatch</span></code> concept</a> for the common
+ parts.
+ </p>
+<div class="section">
+<div class="titlepage"><div><div><h6 class="title">
+<a name="boost_chrono_stopwatches.reference.stopwatches.lightweight_stopwatch_hpp.lightweight_stopwatch.c1"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.lightweight_stopwatch_hpp.lightweight_stopwatch.c1" title="Constructor lightweight_stopwatch( storage&amp;, system::error_code &amp;)">Constructor
+ <code class="computeroutput"><span class="identifier">lightweight_stopwatch</span><span class="special">(</span> <span class="identifier">storage</span><span class="special">&amp;,</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span>
+ <span class="special">&amp;)</span></code></a>
+</h6></div></div></div>
+<pre class="programlisting"><span class="keyword">explicit</span> <span class="identifier">lightweight_stopwatch</span><span class="special">(</span> <span class="identifier">storage</span><span class="special">&amp;</span> <span class="identifier">st</span><span class="special">,</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+</pre>
+<p>
+ <span class="bold"><strong>Effect:</strong></span> constructs and starts the
+ lightweight_stopwatch.
+ </p>
+<p>
+ <span class="bold"><strong>Throw:</strong></span> Any exception the <code class="computeroutput"><span class="identifier">Clock</span><span class="special">::</span><span class="identifier">now</span></code> function can throw when <code class="computeroutput"><span class="identifier">ec</span></code> is <code class="computeroutput"><span class="identifier">throws</span><span class="special">()</span></code>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h6 class="title">
+<a name="boost_chrono_stopwatches.reference.stopwatches.lightweight_stopwatch_hpp.lightweight_stopwatch.c2"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.lightweight_stopwatch_hpp.lightweight_stopwatch.c2" title="Constructor lightweight_stopwatch( storage&amp;, dont_start_t &amp;)">Constructor
+ <code class="computeroutput"><span class="identifier">lightweight_stopwatch</span><span class="special">(</span> <span class="identifier">storage</span><span class="special">&amp;,</span> <span class="identifier">dont_start_t</span>
+ <span class="special">&amp;)</span></code></a>
+</h6></div></div></div>
+<pre class="programlisting"><span class="keyword">explicit</span> <span class="identifier">lightweight_stopwatch</span><span class="special">(</span> <span class="identifier">storage</span><span class="special">&amp;</span> <span class="identifier">st</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">dont_start_t</span><span class="special">&amp;</span> <span class="identifier">t</span> <span class="special">);</span>
+</pre>
+<p>
+ <span class="bold"><strong>Effect:</strong></span> constructs the lightweight_stopwatch
+ without starting it.
+ </p>
+<p>
+ <span class="bold"><strong>Throw:</strong></span> Nothing.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h6 class="title">
+<a name="boost_chrono_stopwatches.reference.stopwatches.lightweight_stopwatch_hpp.lightweight_stopwatch.get_storage"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.lightweight_stopwatch_hpp.lightweight_stopwatch.get_storage" title="Member Function get_storage()">Member
+ Function <code class="computeroutput"><span class="identifier">get_storage</span><span class="special">()</span></code></a>
+</h6></div></div></div>
+<pre class="programlisting"><span class="identifier">storage</span><span class="special">&amp;</span> <span class="identifier">get_storage</span><span class="special">();</span>
+</pre>
+<p>
+ <span class="bold"><strong>Returns:</strong></span> the assocaited storage reference.
+ </p>
+<p>
+ <span class="bold"><strong>Throw:</strong></span> Nothing.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h6 class="title">
+<a name="boost_chrono_stopwatches.reference.stopwatches.lightweight_stopwatch_hpp.lightweight_stopwatch.reset"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.lightweight_stopwatch_hpp.lightweight_stopwatch.reset" title="Member Function reset()">Member
+ Function <code class="computeroutput"><span class="identifier">reset</span><span class="special">()</span></code></a>
+</h6></div></div></div>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">reset</span><span class="special">(</span> <span class="special">);</span>
+</pre>
+<p>
+ <span class="bold"><strong>Effect:</strong></span> Stop the lightweight_stopwatch
+ and reinit the storage.
+ </p>
+<p>
+ <span class="bold"><strong>Throw:</strong></span> Nothing.
+ </p>
+</div>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp" title="Header &lt;boost/chrono/stopwatches/stopwatch.hpp&gt;">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopwatch</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp.stopwatch">Template
+ Class <code class="computeroutput"><span class="identifier">stopwatch</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp.spec"><code class="computeroutput"><span class="identifier">stopwatch_reporter_default_formatter</span></code>
+ Specialization</a></span></dt>
+<dt><span class="section">stopwatch useful typedefs</span></dt>
+</dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">=</span><span class="identifier">high_resolution_clock</span><span class="special">&gt;</span> <span class="keyword">class</span> <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp.stopwatch" title="Template Class stopwatch&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch</span></code></a><span class="special">;</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">stopwatch_reporter_default_formatter</span><span class="special">&lt;</span><span class="identifier">stopwatch</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">stopwatch_formatter</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">wstopwatch_reporter_default_formatter</span><span class="special">&lt;</span><span class="identifier">stopwatch</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">wstopwatch_formatter</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">&gt;</span> <span class="identifier">system_stopwatch</span><span class="special">;</span>
+ <span class="preprocessor">#ifdef</span> <code class="computeroutput"><span class="identifier">BOOST_CHRONO_HAS_CLOCK_STEADY</span></code>
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">&gt;</span> <span class="identifier">steady_stopwatch</span><span class="special">;</span>
+ <span class="preprocessor">#endif</span>
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">&gt;</span> <span class="identifier">high_resolution_stopwatch</span><span class="special">;</span>
+<span class="special">}}</span>
+</pre>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp.stopwatch"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp.stopwatch" title="Template Class stopwatch&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">stopwatch</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp.stopwatch.c1">Constructor
+ <code class="computeroutput"><span class="identifier">stopwatch</span><span class="special">(</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;)</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp.stopwatch.c2">Constructor
+ <code class="computeroutput"><span class="identifier">stopwatch</span><span class="special">(</span>
+ <span class="identifier">dont_start_t</span> <span class="special">&amp;)</span></code></a></span></dt>
+</dl></div>
+<p>
+ <code class="computeroutput"><span class="identifier">stopwatch</span><span class="special">&lt;&gt;</span></code>
+ is a model of a <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req" title="Stopwatch Requirements"><code class="computeroutput"><span class="identifier">Stopwatch</span></code> concept</a>.
+ </p>
+<p>
+ Knowing how long a part of a program takes to execute is useful in both
+ test and production environments. A <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp.stopwatch" title="Template Class stopwatch&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch</span></code></a> object measures elapsed
+ time. It is recommended to use it with clocks that measure wall clock
+ rather than CPU time since the intended use is performance measurement
+ on systems where total elapsed time is more important than just process
+ or CPU time.
+ </p>
+<p>
+ The maximum measurable elapsed time depends on the Clock parameter. The
+ accuracy of timings depends on the accuracy of timing information provided
+ the Clock, and this could varies a great deal from one clock to another.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">stopwatch</span> <span class="special">:</span>
+ <span class="keyword">private</span> <span class="identifier">base_from_member</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Clock</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&gt;,</span>
+ <span class="keyword">public</span> <span class="identifier">lightweight_stopwatch</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;</span>
+<span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">explicit</span> <span class="identifier">stopwatch</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">stopwatch</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">dont_start_t</span><span class="special">&amp;</span> <span class="identifier">t</span> <span class="special">);</span>
+
+<span class="special">};</span>
+</pre>
+<div class="section">
+<div class="titlepage"><div><div><h6 class="title">
+<a name="boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp.stopwatch.c1"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp.stopwatch.c1" title="Constructor stopwatch( system::error_code &amp;)">Constructor
+ <code class="computeroutput"><span class="identifier">stopwatch</span><span class="special">(</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;)</span></code></a>
+</h6></div></div></div>
+<pre class="programlisting"><span class="keyword">explicit</span> <span class="identifier">stopwatch</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+</pre>
+<p>
+ <span class="bold"><strong>Effect:</strong></span> constructs and starts the
+ stopwatch.
+ </p>
+<p>
+ <span class="bold"><strong>Throw:</strong></span> Any exception the <code class="computeroutput"><span class="identifier">Clock</span><span class="special">::</span><span class="identifier">now</span></code> function can throw when <code class="computeroutput"><span class="identifier">ec</span></code> is <code class="computeroutput"><span class="identifier">throws</span><span class="special">()</span></code>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h6 class="title">
+<a name="boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp.stopwatch.c2"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp.stopwatch.c2" title="Constructor stopwatch( dont_start_t &amp;)">Constructor
+ <code class="computeroutput"><span class="identifier">stopwatch</span><span class="special">(</span>
+ <span class="identifier">dont_start_t</span> <span class="special">&amp;)</span></code></a>
+</h6></div></div></div>
+<pre class="programlisting"><span class="keyword">explicit</span> <span class="identifier">stopwatch</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">dont_start_t</span><span class="special">&amp;</span> <span class="identifier">t</span> <span class="special">);</span>
+</pre>
+<p>
+ <span class="bold"><strong>Effect:</strong></span> constructs the stopwatch without
+ starting it.
+ </p>
+<p>
+ <span class="bold"><strong>Throw:</strong></span> Nothing.
+ </p>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp.spec"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp.spec" title="stopwatch_reporter_default_formatter Specialization"><code class="computeroutput"><span class="identifier">stopwatch_reporter_default_formatter</span></code>
+ Specialization</a>
+</h5></div></div></div>
+<p>
+ The <code class="computeroutput"><span class="identifier">stopwatch_reporter_default_formatter</span></code>
+ of a <code class="computeroutput"><span class="identifier">stopwatch</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;</span></code>
+ is a <code class="computeroutput"><span class="identifier">stopwatch_formatter</span></code>.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">stopwatch_reporter_default_formatter</span><span class="special">&lt;</span><span class="identifier">stopwatch</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">stopwatch_formatter</span> <span class="identifier">type</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<p>
+ The <code class="computeroutput"><span class="identifier">wstopwatch_reporter_default_formatter</span></code>
+ of a <code class="computeroutput"><span class="identifier">stopwatch</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;</span></code>
+ is a <code class="computeroutput"><span class="identifier">wstopwatch_formatter</span></code>.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">wstopwatch_reporter_default_formatter</span><span class="special">&lt;</span><span class="identifier">stopwatch</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">wstopwatch_formatter</span> <span class="identifier">type</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp.stopwatch_typedefs"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp.stopwatch_typedefs" title="stopwatch useful typedefs"><code class="computeroutput"><span class="identifier">stopwatch</span></code> useful typedefs</a>
+</h5></div></div></div>
+<p>
+ The library provides stopwatch short cuts for all the models of <code class="computeroutput"><span class="identifier">Clock</span></code>, replacing clock by stopwatch.
+ </p>
+<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopwatch</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">system_clock</span> <span class="special">&gt;</span>
+ <span class="identifier">system_stopwatch</span><span class="special">;</span>
+<span class="preprocessor">#ifdef</span> <code class="computeroutput"><span class="identifier">BOOST_CHRONO_HAS_CLOCK_STEADY</span></code>
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopwatch</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">steady_clock</span> <span class="special">&gt;</span>
+ <span class="identifier">steady_stopwatch</span><span class="special">;</span>
+<span class="preprocessor">#endif</span>
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopwatch</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">high_resolution_clock</span> <span class="special">&gt;</span>
+ <span class="identifier">high_resolution_stopwatch</span><span class="special">;</span>
+</pre>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono_stopwatches.reference.stopwatches.stopwatch_accumulator_hpp"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_accumulator_hpp" title="Header &lt;boost/chrono/stopwatches/stopwatch_accumulator.hpp&gt;">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopwatch_accumulator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_accumulator_hpp.stopwatch_accumulator">Template
+ Class <code class="computeroutput"><span class="identifier">stopwatch_accumulator</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_accumulator_hpp.spec"><code class="computeroutput"><span class="identifier">stopwatch_reporter_default_formatter</span></code>
+ Specialization</a></span></dt>
+<dt><span class="section">stopwatch_accumulator useful typedefs</span></dt>
+</dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">Features</span><span class="special">=</span><span class="identifier">accumulators</span><span class="special">::</span><span class="identifier">features</span><span class="special">&lt;</span>
+ <span class="identifier">accumulators</span><span class="special">::</span><span class="identifier">tag</span><span class="special">::</span><span class="identifier">count</span><span class="special">,</span>
+ <span class="identifier">accumulators</span><span class="special">::</span><span class="identifier">tag</span><span class="special">::</span><span class="identifier">sum</span><span class="special">,</span>
+ <span class="identifier">accumulators</span><span class="special">::</span><span class="identifier">tag</span><span class="special">::</span><span class="identifier">min</span><span class="special">,</span>
+ <span class="identifier">accumulators</span><span class="special">::</span><span class="identifier">tag</span><span class="special">::</span><span class="identifier">max</span><span class="special">,</span>
+ <span class="identifier">accumulators</span><span class="special">::</span><span class="identifier">tag</span><span class="special">::</span><span class="identifier">mean</span> <span class="special">&gt;,</span>
+ <span class="keyword">typename</span> <span class="identifier">Weight</span><span class="special">=</span><span class="keyword">void</span>
+ <span class="special">&gt;</span> <span class="keyword">class</span> <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_accumulator_hpp.stopwatch_accumulator" title="Template Class stopwatch_accumulator&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch_accumulator</span></code></a><span class="special">;</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Accumulator</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">stopwatch_reporter_default_formatter</span><span class="special">&lt;</span><span class="identifier">stopwatch_accumulator</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Accumulator</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">stopwatch_accumulator_formatter</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Accumulator</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">wstopwatch_reporter_default_formatter</span><span class="special">&lt;</span><span class="identifier">stopwatch_accumulator</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Accumulator</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">wstopwatch_accumulator_formatter</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">below</span><span class="special">&gt;</span> <span class="identifier">system_stopwatch_accumulator</span><span class="special">;</span>
+<span class="preprocessor">#ifdef</span> <code class="computeroutput"><span class="identifier">BOOST_CHRONO_HAS_CLOCK_STEADY</span></code>
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">below</span><span class="special">&gt;</span> <span class="identifier">steady_stopwatch_accumulator</span><span class="special">;</span>
+<span class="preprocessor">#endif</span>
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">below</span><span class="special">&gt;</span> <span class="identifier">high_resolution_stopwatch_accumulator</span><span class="special">;</span>
+
+<span class="special">}}</span>
+</pre>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.stopwatches.stopwatch_accumulator_hpp.stopwatch_accumulator"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_accumulator_hpp.stopwatch_accumulator" title="Template Class stopwatch_accumulator&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">stopwatch_accumulator</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_accumulator_hpp.stopwatch_accumulator.c">Constructor
+ <code class="computeroutput"><span class="identifier">stopwatch_accumulator</span><span class="special">()</span></code></a></span></dt></dl></div>
+<p>
+ A <code class="computeroutput"><span class="identifier">stopwatch_accumulator</span><span class="special">&lt;&gt;</span></code> is a model of a <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req" title="Stopwatch Requirements"><code class="computeroutput"><span class="identifier">Stopwatch</span></code> concept</a> that allows
+ to accumulate the time in several times instead of at once as it is the
+ case of the class <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp.stopwatch" title="Template Class stopwatch&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch</span></code></a><code class="computeroutput"><span class="special">&lt;&gt;</span></code>.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Features</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Weight</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">stopwatch_accumulator</span>
+ <span class="special">:</span> <span class="keyword">private</span> <span class="identifier">base_from_member</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">accumulators</span><span class="special">::</span><span class="identifier">accumulator_set</span><span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">Clock</span><span class="special">::</span><span class="identifier">duration</span><span class="special">::</span><span class="identifier">rep</span><span class="special">,</span> <span class="identifier">Features</span><span class="special">,</span> <span class="identifier">Weight</span>
+ <span class="special">&gt;</span>
+ <span class="special">&gt;,</span>
+ <span class="keyword">public</span> <span class="identifier">lightweight_stopwatch</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span><span class="identifier">Features</span><span class="special">,</span><span class="identifier">Weight</span><span class="special">&gt;</span>
+<span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="identifier">stopwatch_accumulator</span><span class="special">(</span> <span class="special">);</span>
+<span class="special">};</span>
+</pre>
+<div class="section">
+<div class="titlepage"><div><div><h6 class="title">
+<a name="boost_chrono_stopwatches.reference.stopwatches.stopwatch_accumulator_hpp.stopwatch_accumulator.c"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_accumulator_hpp.stopwatch_accumulator.c" title="Constructor stopwatch_accumulator()">Constructor
+ <code class="computeroutput"><span class="identifier">stopwatch_accumulator</span><span class="special">()</span></code></a>
+</h6></div></div></div>
+<pre class="programlisting"><span class="identifier">stopwatch_accumulator</span><span class="special">();</span>
+</pre>
+<p>
+ <span class="bold"><strong>Effect:</strong></span> Initialize the elapsed duration
+ and the times counter to 0. The stopwatch is not started.
+ </p>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.stopwatches.stopwatch_accumulator_hpp.spec"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_accumulator_hpp.spec" title="stopwatch_reporter_default_formatter Specialization"><code class="computeroutput"><span class="identifier">stopwatch_reporter_default_formatter</span></code>
+ Specialization</a>
+</h5></div></div></div>
+<p>
+ The <code class="computeroutput"><span class="identifier">stopwatch_reporter_default_formatter</span></code>
+ of a <code class="computeroutput"><span class="identifier">stopwatch_accumulator</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;</span></code> is a <code class="computeroutput"><span class="identifier">stopwatch_accumulator_formatter</span></code>.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Accumulator</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">stopwatch_reporter_default_formatter</span><span class="special">&lt;</span><span class="identifier">stopwatch_accumulator</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Accumulator</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">stopwatch_accumulator_formatter</span> <span class="identifier">type</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<p>
+ The <code class="computeroutput"><span class="identifier">wstopwatch_reporter_default_formatter</span></code>
+ of a <code class="computeroutput"><span class="identifier">stopwatch_accumulator</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;</span></code> is a <code class="computeroutput"><span class="identifier">wstopwatch_accumulator_formatter</span></code>.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Accumulator</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">wstopwatch_reporter_default_formatter</span><span class="special">&lt;</span><span class="identifier">stopwatch_accumulator</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Accumulator</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">wstopwatch_accumulator_formatter</span> <span class="identifier">type</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.stopwatches.stopwatch_accumulator_hpp.typedefs"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_accumulator_hpp.typedefs" title="stopwatch_accumulator useful typedefs"><code class="computeroutput"><span class="identifier">stopwatch_accumulator</span></code> useful typedefs</a>
+</h5></div></div></div>
+<p>
+ The library provides stopwatch_accumulator shortcuts for all the models
+ of <code class="computeroutput"><span class="identifier">Clock</span></code>, replacing clock
+ by stopwatch_accumulator.
+ </p>
+<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopwatch_accumulator</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">system_clock</span> <span class="special">&gt;</span>
+ <span class="identifier">system_stopwatch_accumulator</span><span class="special">;</span>
+<span class="preprocessor">#ifdef</span> <code class="computeroutput"><span class="identifier">BOOST_CHRONO_HAS_CLOCK_STEADY</span></code>
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopwatch_accumulator</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">steady_clock</span> <span class="special">&gt;</span>
+ <span class="identifier">steady_stopwatch_accumulator</span><span class="special">;</span>
+<span class="preprocessor">#endif</span>
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopwatch_accumulator</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">high_resolution_clock</span> <span class="special">&gt;</span>
+ <span class="identifier">high_resolution_stopwatch_accumulator</span><span class="special">;</span>
+</pre>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono_stopwatches.reference.stopwatches.stopwatch_scoped_hpp"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_scoped_hpp" title="Header &lt;boost/chrono/stopwatches/stopwatch_scoped.hpp&gt;">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopwatch_scoped</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_scoped_hpp.stopwatch_runner">Template
+ Class <code class="computeroutput"><span class="identifier">stopwatch_runner</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_scoped_hpp.stopwatch_suspender">Template
+ Class <code class="computeroutput"><span class="identifier">stopwatch_suspender</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_scoped_hpp.stopwatch_resumer">Template
+ Class <code class="computeroutput"><span class="identifier">stopwatch_resumer</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+</dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Stopwatch</span><span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">stopwatch_runner</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Stopwatch</span><span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">stopwatch_suspender</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Stopwatch</span><span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">stopwatch_resumer</span><span class="special">;</span>
+<span class="special">}}</span>
+</pre>
+<p>
+ Boost.Chrono provides some helper classes ensuring pairwised operations
+ (start/stop, suspend/resume, resule/suspend).
+ </p>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.stopwatches.stopwatch_scoped_hpp.stopwatch_runner"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_scoped_hpp.stopwatch_runner" title="Template Class stopwatch_runner&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">stopwatch_runner</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<p>
+ This helper class ensures that the start/stop are pairwised. Starts the
+ associated <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req" title="Stopwatch Requirements"><code class="computeroutput"><span class="identifier">Stopwatch</span></code></a> at construction time,
+ and stops it at destruction time.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Stopwatch</span><span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">stopwatch_runner</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">Stopwatch</span> <span class="identifier">stopwatch</span><span class="special">;</span>
+ <span class="identifier">stopwatch_runner</span><span class="special">(</span><span class="identifier">stopwatch</span> <span class="special">&amp;</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">());</span>
+ <span class="special">~</span><span class="identifier">stopwatch_runner</span><span class="special">();</span>
+ <span class="identifier">stopwatch_runner</span><span class="special">()</span> <span class="special">=</span> <span class="keyword">delete</span><span class="special">;</span>
+ <span class="identifier">stopwatch_runner</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">stopwatch_runner</span><span class="special">&amp;)</span> <span class="special">=</span> <span class="keyword">delete</span><span class="special">;</span>
+ <span class="identifier">stopwatch_runner</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">stopwatch_runner</span><span class="special">&amp;)</span> <span class="special">=</span> <span class="keyword">delete</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<p>
+ Usage
+ </p>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f1</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="keyword">static</span> <span class="identifier">stopwatch_accumulator</span><span class="special">&lt;&gt;</span> <span class="identifier">t</span><span class="special">;</span>
+ <span class="identifier">stopwatch_runner</span><span class="special">&lt;</span><span class="identifier">stopwatch_accumulator</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">_</span><span class="special">(</span><span class="identifier">t</span><span class="special">);</span>
+ <span class="comment">// ...
+</span><span class="special">}</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.stopwatches.stopwatch_scoped_hpp.stopwatch_suspender"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_scoped_hpp.stopwatch_suspender" title="Template Class stopwatch_suspender&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">stopwatch_suspender</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<p>
+ This helper class ensures that the suspend/resume are pairwised. Suspends
+ the associated <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req" title="Stopwatch Requirements"><code class="computeroutput"><span class="identifier">Stopwatch</span></code></a> at construction time,
+ and resumes it at destruction time.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Stopwatch</span><span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">stopwatch_suspender</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">Stopwatch</span> <span class="identifier">stopwatch</span><span class="special">;</span>
+ <span class="identifier">stopwatch_suspender</span><span class="special">(</span><span class="identifier">stopwatch</span> <span class="special">&amp;</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">());</span>
+ <span class="special">~</span><span class="identifier">stopwatch_suspender</span><span class="special">();</span>
+ <span class="identifier">stopwatch_suspender</span><span class="special">()</span> <span class="special">=</span> <span class="keyword">delete</span><span class="special">;</span>
+ <span class="identifier">stopwatch_suspender</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">stopwatch_suspender</span><span class="special">&amp;)</span> <span class="special">=</span> <span class="keyword">delete</span><span class="special">;</span>
+ <span class="identifier">stopwatch_suspender</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">stopwatch_suspender</span><span class="special">&amp;)</span> <span class="special">=</span> <span class="keyword">delete</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ Usage
+ </p>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f1</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="keyword">static</span> <span class="identifier">stopwatch_accumulator</span><span class="special">&lt;&gt;</span> <span class="identifier">t</span><span class="special">;</span>
+ <span class="identifier">stopwatch_runner</span><span class="special">&lt;</span><span class="identifier">stopwatch_accumulator</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">_</span><span class="special">(</span><span class="identifier">t</span><span class="special">);</span>
+ <span class="comment">// ...
+</span>
+ <span class="comment">// call to some function we don't want to measure
+</span> <span class="special">{</span>
+ <span class="identifier">stopwatch_suspender</span><span class="special">&lt;</span><span class="identifier">stopwatch_accumulator</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">_</span><span class="special">(</span><span class="identifier">t</span><span class="special">);</span>
+ <span class="identifier">external_function</span><span class="special">();</span>
+ <span class="special">}</span>
+<span class="special">}</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.stopwatches.stopwatch_scoped_hpp.stopwatch_resumer"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_scoped_hpp.stopwatch_resumer" title="Template Class stopwatch_resumer&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">stopwatch_resumer</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<p>
+ This helper class ensures that the resume/suspend are pairwised. Resumes
+ the associated <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req" title="Stopwatch Requirements"><code class="computeroutput"><span class="identifier">Stopwatch</span></code></a> at construction time,
+ and suspends it at destruction time.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Stopwatch</span><span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">stopwatch_resumer</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">Stopwatch</span> <span class="identifier">stopwatch</span><span class="special">;</span>
+ <span class="identifier">stopwatch_resumer</span><span class="special">(</span><span class="identifier">stopwatch</span> <span class="special">&amp;</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">());</span>
+ <span class="special">~</span><span class="identifier">stopwatch_resumer</span><span class="special">();</span>
+ <span class="identifier">stopwatch_resumer</span><span class="special">()</span> <span class="special">=</span> <span class="keyword">delete</span><span class="special">;</span>
+ <span class="identifier">stopwatch_resumer</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">stopwatch_resumer</span><span class="special">&amp;)</span> <span class="special">=</span> <span class="keyword">delete</span><span class="special">;</span>
+ <span class="identifier">stopwatch_resumer</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">stopwatch_resumer</span><span class="special">&amp;)</span> <span class="special">=</span> <span class="keyword">delete</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ Usage
+ </p>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f1</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="keyword">static</span> <span class="identifier">stopwatch_accumulator</span><span class="special">&lt;&gt;</span> <span class="identifier">t</span><span class="special">;</span>
+ <span class="identifier">stopwatch_runner</span><span class="special">&lt;</span><span class="identifier">stopwatch_accumulator</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">_</span><span class="special">(</span><span class="identifier">t</span><span class="special">);</span>
+ <span class="comment">// ...
+</span>
+ <span class="comment">// call to some function we don't want to measure
+</span> <span class="special">{</span>
+ <span class="identifier">stopwatch_suspender</span><span class="special">&lt;</span><span class="identifier">stopwatch_accumulator</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">_</span><span class="special">(</span><span class="identifier">t</span><span class="special">);</span>
+
+ <span class="special">{</span>
+ <span class="identifier">stopwatch_resumer</span><span class="special">&lt;</span><span class="identifier">stopwatch_accumulator</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">_</span><span class="special">(</span><span class="identifier">t</span><span class="special">);</span>
+
+ <span class="special">}</span>
+ <span class="special">}</span>
+<span class="special">}</span>
+</pre>
+</div>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_chrono_stopwatches.reference.reporters"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters" title="Stopwatch Reporters">Stopwatch
+ Reporters</a>
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">Formatter Requirements</span></dt>
+<dt><span class="section">Formatter related traits</span></dt>
+<dt><span class="section">Reporter Requirements</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters.reporters_req.R">Member
+ Function <code class="computeroutput"><span class="identifier">R</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters.reporters_req.report">Member
+ Function <code class="computeroutput"><span class="identifier">report</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters.reporters_req.reported">Member
+ Function <code class="computeroutput"><span class="identifier">reported</span><span class="special">()</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters.stopwatch_reporter_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopwatch_reporter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters.stopwatch_reporter_hpp.basic_stopwatch_reporter">Template
+ Class <code class="computeroutput"><span class="identifier">basic_stopwatch_reporter</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters.stopwatch_reporter_hpp.stopwatch_reporter">Template
+ Class <code class="computeroutput"><span class="identifier">stopwatch_reporter</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters.stopwatch_reporter_hpp.wstopwatch_reporter">Template
+ Class <code class="computeroutput"><span class="identifier">wstopwatch_reporter</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopclock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_hpp.basic_stopclock">Template
+ Class <code class="computeroutput"><span class="identifier">basic_stopclock</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_hpp.stopclock">Template
+ Class <code class="computeroutput"><span class="identifier">stopclock</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section">stopclock useful typedefs</span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_hpp.wstopclock">Template
+ Class <code class="computeroutput"><span class="identifier">wstopclock</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section">wstopclock useful typedefs</span></dt>
+</dl></dd>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_accumulator_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopclock_accumulator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_accumulator_hpp.basic_stopclock_accumulator">Template
+ Class <code class="computeroutput"><span class="identifier">basic_stopclock_accumulator</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_accumulator_hpp.stopclock_accumulator">Template
+ Class <code class="computeroutput"><span class="identifier">stopclock_accumulator</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section">stopclock_accumulator useful typedefs</span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_accumulator_hpp.wstopclock_accumulator">Template
+ Class <code class="computeroutput"><span class="identifier">wstopclock_accumulator</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section">wstopclock_accumulator useful typedefs</span></dt>
+</dl></dd>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters.scoped_stopclock_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">scoped_stopclock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl><dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters.scoped_stopclock_hpp.scoped_stopclock">Template
+ Class <code class="computeroutput"><span class="identifier">scoped_stopclock</span><span class="special">&lt;&gt;</span></code></a></span></dt></dl></dd>
+</dl></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono_stopwatches.reference.reporters.formatter_req"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.formatter_req" title="Formatter Requirements"><code class="computeroutput"><span class="identifier">Formatter</span></code> Requirements</a>
+</h4></div></div></div>
+<p>
+ A Formatter outputs on a given ostream a formatted string combining informations
+ from a Stopwatch and the format and the double precision.
+ </p>
+<p>
+ A Formatter must meet the requirements in the following Table.
+ </p>
+<p>
+ In this table <code class="computeroutput"><span class="identifier">F</span></code> denote
+ a Formatter type, <code class="computeroutput"><span class="identifier">S</span></code> is
+ a Stopwatch and <code class="computeroutput"><span class="identifier">s</span></code> is an
+ instance of <code class="computeroutput"><span class="identifier">S</span></code>, <code class="computeroutput"><span class="identifier">f</span></code> is <code class="computeroutput"><span class="keyword">const</span>
+ <span class="keyword">char</span> <span class="special">*</span></code>
+ , <code class="computeroutput"><span class="identifier">p</span></code> is and int, and <code class="computeroutput"><span class="identifier">os</span></code> is a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span></code>,
+ ec is a system::error_code
+ </p>
+<div class="table">
+<a name="boost_chrono_stopwatches.reference.reporters.formatter_req.formatter_requirements"></a><p class="title"><b>Table&#160;3.&#160;Formatter Requirements</b></p>
+<div class="table-contents"><table class="table" summary="Formatter Requirements">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ expression
+ </p>
+ </th>
+<th>
+ <p>
+ return type
+ </p>
+ </th>
+<th>
+ <p>
+ operational semantics
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">F</span><span class="special">::</span><span class="identifier">default_os</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ std::otream&amp;
+ </p>
+ </td>
+<td>
+ <p>
+ The output stream.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">F</span><span class="special">::</span><span class="identifier">default_places</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The precision when displaying a double.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">F</span><span class="special">::</span><span class="identifier">default_format</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The default format.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">F</span><span class="special">::</span><span class="identifier">show_time</span><span class="special">(</span><span class="identifier">s</span><span class="special">,</span><span class="identifier">f</span><span class="special">,</span><span class="identifier">p</span><span class="special">,</span><span class="identifier">os</span><span class="special">,</span><span class="identifier">ec</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">S</span><span class="special">::</span><span class="identifier">time_point</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ outputs on <code class="computeroutput"><span class="identifier">os</span></code>
+ a formatted string combining informations from the Stopwatch
+ <code class="computeroutput"><span class="identifier">s</span></code>, the format
+ <code class="computeroutput"><span class="identifier">f</span></code> and the double
+ precision <code class="computeroutput"><span class="identifier">p</span></code>.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<br class="table-break"><p>
+ Models of <code class="computeroutput"><span class="identifier">Formatter</span></code>:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ <a class="link" href="reference.html#boost_chrono_stopwatches.reference.formatters.stopwatch_formatter_hpp.basic_stopwatch_formatter" title="Template Class basic_stopwatch_formatter&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch_accumulator_formatter</span></code></a>
+ </li>
+<li class="listitem">
+ <a class="link" href="reference.html#boost_chrono_stopwatches.reference.formatters.stopwatch_accumulator_formatter_hpp.basic_stopwatch_accumulator_formatter" title="Template Class basic_stopwatch_accumulator_formatter&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch_accumulator_formatter</span></code></a>
+ </li>
+<li class="listitem">
+ <a class="link" href="reference.html#boost_chrono_stopwatches.reference.formatters.t24_hours_formatter_hpp.basic_24_hours_formatter" title="Template Class basic_24_hours_formatter&lt;&gt;"><code class="computeroutput"><span class="identifier">basic_24_hours_formatter</span></code></a>
+ </li>
+</ul></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono_stopwatches.reference.reporters._formatter__related_traits"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters._formatter__related_traits" title="Formatter related traits"><code class="computeroutput"><span class="identifier">Formatter</span></code> related traits</a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Stopwatch</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">stopwatch_reporter_default_formatter</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">below</span><span class="special">&gt;</span> <span class="identifier">type</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<p>
+ The nested typedef <code class="computeroutput"><span class="identifier">type</span></code>
+ defines the default formatter used by the <a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopwatch_reporter_hpp.stopwatch_reporter" title="Template Class stopwatch_reporter&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch_reporter</span></code></a> class when
+ the <code class="computeroutput"><span class="identifier">Formatter</span></code> parameter
+ is not explicit.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono_stopwatches.reference.reporters.reporters_req"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.reporters_req" title="Reporter Requirements"><code class="computeroutput"><span class="identifier">Reporter</span></code> Requirements</a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters.reporters_req.R">Member
+ Function <code class="computeroutput"><span class="identifier">R</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters.reporters_req.report">Member
+ Function <code class="computeroutput"><span class="identifier">report</span><span class="special">()</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters.reporters_req.reported">Member
+ Function <code class="computeroutput"><span class="identifier">reported</span><span class="special">()</span></code></a></span></dt>
+</dl></div>
+<p>
+ A <code class="computeroutput"><span class="identifier">Reporter</span></code> provides everything
+ a <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req" title="Stopwatch Requirements"><code class="computeroutput"><span class="identifier">Stopwatch</span></code></a> provides and adds reporting
+ capabilities. The reporting is controleed by two parameters:
+ </p>
+<p>
+ A <code class="computeroutput"><span class="identifier">Reporter</span></code> must meet the
+ requirements in the following table in addition of the <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req" title="Stopwatch Requirements"><code class="computeroutput"><span class="identifier">Stopwatch</span></code></a>. The reporting is controleed
+ by two parameters:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ format : The output format
+ </li>
+<li class="listitem">
+ places(precision): the number of decimal placess used.
+ </li>
+</ul></div>
+<p>
+ And is sent to an output stream.
+ </p>
+<p>
+ In this table <code class="computeroutput"><span class="identifier">R</span></code> denote
+ Reporters types. <code class="computeroutput"><span class="identifier">r</span></code> is an
+ instance of <code class="computeroutput"><span class="identifier">R</span></code>, ec is a
+ system::error_code, os is an std::ostream, f is a std::string, p is an
+ int. From the library perspective a Reporter needs to satisfy the following
+ requirements.
+ </p>
+<div class="table">
+<a name="boost_chrono_stopwatches.reference.reporters.reporters_req.reporter_requirements"></a><p class="title"><b>Table&#160;4.&#160;Reporter Requirements</b></p>
+<div class="table-contents"><table class="table" summary="Reporter Requirements">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ expression
+ </p>
+ </th>
+<th>
+ <p>
+ return type
+ </p>
+ </th>
+<th>
+ <p>
+ operational semantics
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">R</span><span class="special">::</span><span class="identifier">stopwatch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ A model of <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req" title="Stopwatch Requirements"><code class="computeroutput"><span class="identifier">Stopwatch</span></code></a>.
+ </p>
+ </td>
+<td>
+ <p>
+ The Stopwatch associated to this Reporter.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">r</span><span class="special">.</span><span class="identifier">report</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">void</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Creates a report.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">r</span><span class="special">.</span><span class="identifier">report</span><span class="special">(</span><span class="identifier">ec</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">void</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Creates a report.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">r</span><span class="special">.</span><span class="identifier">reported</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">bool</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The reporting has been done.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<br class="table-break"><p>
+ From the user point of view, the reporter provides often construction with
+ any of the parameters controleed the reporting.
+ </p>
+<div class="table">
+<a name="boost_chrono_stopwatches.reference.reporters.reporters_req.open_reporter_requirements"></a><p class="title"><b>Table&#160;5.&#160;Open Reporter Requirements</b></p>
+<div class="table-contents"><table class="table" summary="Open Reporter Requirements">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ expression
+ </p>
+ </th>
+<th>
+ <p>
+ return type
+ </p>
+ </th>
+<th>
+ <p>
+ operational semantics
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">R</span> <span class="identifier">r</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">R</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Creates a Reporter.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">R</span> <span class="identifier">r</span><span class="special">(</span><span class="identifier">ec</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">R</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Creates a Reporter.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">R</span> <span class="identifier">r</span><span class="special">(</span><span class="identifier">os</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">R</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Creates a Reporter.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">R</span> <span class="identifier">r</span><span class="special">(</span><span class="identifier">os</span><span class="special">,</span><span class="identifier">ec</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">R</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Creates a Reporter.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">R</span> <span class="identifier">r</span><span class="special">(</span><span class="identifier">os</span><span class="special">,</span><span class="identifier">f</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">R</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Creates a Reporter.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">R</span> <span class="identifier">r</span><span class="special">(</span><span class="identifier">os</span><span class="special">,</span><span class="identifier">f</span><span class="special">,</span><span class="identifier">ec</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">R</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Creates a Reporter.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">R</span> <span class="identifier">r</span><span class="special">(</span><span class="identifier">os</span><span class="special">,</span><span class="identifier">f</span><span class="special">,</span><span class="identifier">p</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">R</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Creates a Reporter.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">R</span> <span class="identifier">r</span><span class="special">(</span><span class="identifier">os</span><span class="special">,</span><span class="identifier">f</span><span class="special">,</span><span class="identifier">p</span><span class="special">,</span><span class="identifier">ec</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">R</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Creates a Reporter.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">R</span> <span class="identifier">r</span><span class="special">(</span><span class="identifier">os</span><span class="special">,</span><span class="identifier">p</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">R</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Creates a Reporter.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">R</span> <span class="identifier">r</span><span class="special">(</span><span class="identifier">os</span><span class="special">,</span><span class="identifier">p</span><span class="special">,</span><span class="identifier">ec</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">R</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Creates a Reporter.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">R</span> <span class="identifier">r</span><span class="special">(</span><span class="identifier">f</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">R</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Creates a Reporter.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">R</span> <span class="identifier">r</span><span class="special">(</span><span class="identifier">f</span><span class="special">,</span><span class="identifier">ec</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">R</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Creates a Reporter.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">R</span> <span class="identifier">r</span><span class="special">(</span><span class="identifier">f</span><span class="special">,</span><span class="identifier">p</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">R</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Creates a Reporter.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">R</span> <span class="identifier">r</span><span class="special">(</span><span class="identifier">f</span><span class="special">,</span><span class="identifier">p</span><span class="special">,</span><span class="identifier">ec</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">R</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Creates a Reporter.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">R</span> <span class="identifier">r</span><span class="special">(</span><span class="identifier">p</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">R</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Creates a Reporter.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">R</span> <span class="identifier">r</span><span class="special">(</span><span class="identifier">p</span><span class="special">,</span><span class="identifier">ec</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">R</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Creates a Reporter.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<br class="table-break"><div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.reporters.reporters_req.R"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.reporters_req.R" title="Member Function R()">Member
+ Function <code class="computeroutput"><span class="identifier">R</span><span class="special">()</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">R</span><span class="special">(</span>
+ <span class="special">[</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> <span class="identifier">os</span> <span class="special">]</span>
+ <span class="special">[,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">]</span>
+ <span class="special">[,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">]</span>
+ <span class="special">[,</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()]</span>
+ <span class="special">);</span>
+</pre>
+<p>
+ <span class="bold"><strong>Effect:</strong></span> Creates a reporter. All the
+ parameters are optional.
+ </p>
+<p>
+ <span class="bold"><strong>Throw:</strong></span> Nothing.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.reporters.reporters_req.report"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.reporters_req.report" title="Member Function report()">Member
+ Function <code class="computeroutput"><span class="identifier">report</span><span class="special">()</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">report</span><span class="special">(</span><span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">());</span>
+</pre>
+<p>
+ <span class="bold"><strong>Effect:</strong></span> Produce a report taking in account
+ the ostream, format and place.
+ </p>
+<p>
+ <span class="bold"><strong>Throw:</strong></span> Any exception the <code class="computeroutput"><span class="identifier">Formatter</span><span class="special">::</span><span class="identifier">show_time</span><span class="special">(*</span><span class="keyword">this</span><span class="special">,</span><span class="identifier">f</span><span class="special">,</span><span class="identifier">p</span><span class="special">,</span><span class="identifier">os</span><span class="special">,</span><span class="identifier">ec</span><span class="special">)</span></code>
+ function can throw when <code class="computeroutput"><span class="identifier">ec</span></code>
+ is <code class="computeroutput"><span class="identifier">throws</span><span class="special">()</span></code>.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.reporters.reporters_req.reported"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.reporters_req.reported" title="Member Function reported()">Member
+ Function <code class="computeroutput"><span class="identifier">reported</span><span class="special">()</span></code></a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">reported</span><span class="special">();</span>
+</pre>
+<p>
+ <span class="bold"><strong>Returns:</strong></span> True if the reportes has ben
+ reported already.
+ </p>
+<p>
+ <span class="bold"><strong>Throw:</strong></span> Nothing.
+ </p>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono_stopwatches.reference.reporters.stopwatch_reporter_hpp"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopwatch_reporter_hpp" title="Header &lt;boost/chrono/stopwatches/stopwatch_reporter.hpp&gt;">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopwatch_reporter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters.stopwatch_reporter_hpp.basic_stopwatch_reporter">Template
+ Class <code class="computeroutput"><span class="identifier">basic_stopwatch_reporter</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters.stopwatch_reporter_hpp.stopwatch_reporter">Template
+ Class <code class="computeroutput"><span class="identifier">stopwatch_reporter</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters.stopwatch_reporter_hpp.wstopwatch_reporter">Template
+ Class <code class="computeroutput"><span class="identifier">wstopwatch_reporter</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+</dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Stopwatch</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Formatter</span><span class="special">&gt;</span>
+ <span class="keyword">class</span> <span class="identifier">basic_stopwatch_reporter</span><span class="special">;</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Stopwatch</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">stopwatch_reporter_default_formatter</span><span class="special">;</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Stopwatch</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">Formatter</span><span class="special">=</span><span class="keyword">typename</span> <span class="identifier">stopwatch_reporter_default_formatter</span><span class="special">&lt;</span><span class="identifier">Stopwatch</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&gt;</span>
+ <span class="keyword">class</span> <a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopwatch_reporter_hpp.stopwatch_reporter" title="Template Class stopwatch_reporter&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch_reporter</span></code></a><span class="special">;</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Stopwatch</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">wstopwatch_reporter_default_formatter</span><span class="special">;</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Stopwatch</span><span class="special">,</span>
+ <span class="keyword">class</span> <span class="identifier">Formatter</span><span class="special">=</span><span class="keyword">typename</span> <span class="identifier">wstopwatch_reporter_default_formatter</span><span class="special">&lt;</span><span class="identifier">Stopwatch</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&gt;</span>
+ <span class="keyword">class</span> <span class="identifier">wstopwatch_reporter</span><span class="special">;</span>
+<span class="special">}}</span>
+</pre>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.reporters.stopwatch_reporter_hpp.basic_stopwatch_reporter"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopwatch_reporter_hpp.basic_stopwatch_reporter" title="Template Class basic_stopwatch_reporter&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">basic_stopwatch_reporter</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<p>
+ class <code class="computeroutput"><span class="identifier">basic_stopwatch_reporter</span></code>
+ provides everything a <code class="computeroutput"><span class="identifier">Stopwatch</span></code>
+ provides and it adds reporting capabilities that can be invoked in a
+ single line of code. The reporting is controleed by two parameters:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ format : The output format
+ </li>
+<li class="listitem">
+ places(precision): the number of decimal placess used.
+ </li>
+</ul></div>
+<p>
+ The default places is given by Formatter::default_places().
+ </p>
+<p>
+ The default format is given by Formatter::default_format().
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Stopwatch</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Formatter</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">basic_stopwatch_reporter</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">Stopwatch</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Stopwatch</span><span class="special">::</span><span class="identifier">clock</span> <span class="identifier">clock</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">Stopwatch</span> <span class="identifier">stopwatch</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">Formatter</span> <span class="identifier">formatter</span><span class="special">;</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">basic_stopwatch_reporter</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">basic_stopwatch_reporter</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">basic_stopwatch_reporter</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">basic_stopwatch_reporter</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">basic_stopwatch_reporter</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">basic_stopwatch_reporter</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">basic_stopwatch_reporter</span><span class="special">(</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">basic_stopwatch_reporter</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">basic_stopwatch_reporter</span><span class="special">(</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">basic_stopwatch_reporter</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="special">~</span><span class="identifier">basic_stopwatch_reporter</span><span class="special">();</span>
+
+ <span class="keyword">void</span> <span class="identifier">report</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">bool</span> <span class="identifier">reported</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+
+ <span class="keyword">typedef</span> <span class="identifier">stopwatch_runner</span><span class="special">&lt;</span><span class="identifier">basic_stopwatch_reporter</span><span class="special">&lt;</span><span class="identifier">Stopwatch</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">scoped_run</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">stopwatch_suspender</span><span class="special">&lt;</span><span class="identifier">basic_stopwatch_reporter</span><span class="special">&lt;</span><span class="identifier">Stopwatch</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">scoped_suspend</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">stopwatch_resumer</span><span class="special">&lt;</span><span class="identifier">basic_stopwatch_reporter</span><span class="special">&lt;</span><span class="identifier">Stopwatch</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">scoped_resume</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.reporters.stopwatch_reporter_hpp.stopwatch_reporter"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopwatch_reporter_hpp.stopwatch_reporter" title="Template Class stopwatch_reporter&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">stopwatch_reporter</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<p>
+ class <a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopwatch_reporter_hpp.stopwatch_reporter" title="Template Class stopwatch_reporter&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch_reporter</span></code></a> provides
+ a everything a <code class="computeroutput"><span class="identifier">Stopwatch</span></code>
+ provides and it adds reporting capabilities that can be invoked in a
+ single line of code. The reporting is controleed by two parameters:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ format : The output format
+ </li>
+<li class="listitem">
+ places(precision): the number of decimal placess used.
+ </li>
+</ul></div>
+<p>
+ The default places is given by Formatter::default_places().
+ </p>
+<p>
+ The default format is given by Formatter::default_format().
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Stopwatch</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Formatter</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">stopwatch_reporter</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">basic_stopwatch_reporter</span><span class="special">&lt;</span><span class="identifier">Stopwatch</span><span class="special">,</span><span class="identifier">Formatter</span><span class="special">&gt;</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Stopwatch</span><span class="special">::</span><span class="identifier">clock</span> <span class="identifier">clock</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">Stopwatch</span> <span class="identifier">stopwatch</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">Formatter</span> <span class="identifier">formatter</span><span class="special">;</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">stopwatch_reporter</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">stopwatch_reporter</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">stopwatch_reporter</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">stopwatch_reporter</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">stopwatch_reporter</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">stopwatch_reporter</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">stopwatch_reporter</span><span class="special">(</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">stopwatch_reporter</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">stopwatch_reporter</span><span class="special">(</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">stopwatch_reporter</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="special">~</span><span class="identifier">stopwatch_reporter</span><span class="special">();</span>
+
+ <span class="keyword">void</span> <span class="identifier">report</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">bool</span> <span class="identifier">reported</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+
+ <span class="keyword">typedef</span> <span class="identifier">stopwatch_runner</span><span class="special">&lt;</span><span class="identifier">stopwatch_reporter</span><span class="special">&lt;</span><span class="identifier">Stopwatch</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">scoped_run</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">stopwatch_suspender</span><span class="special">&lt;</span><span class="identifier">stopwatch_reporter</span><span class="special">&lt;</span><span class="identifier">Stopwatch</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">scoped_suspend</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">stopwatch_resumer</span><span class="special">&lt;</span><span class="identifier">stopwatch_reporter</span><span class="special">&lt;</span><span class="identifier">Stopwatch</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">scoped_resume</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<p>
+ Usage
+ </p>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f1</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">stopwatch_reporter</span><span class="special">&lt;</span><span class="identifier">stopwatch_accumulator</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">accumulator</span><span class="special">;</span>
+ <span class="keyword">static</span> <span class="identifier">accumulator</span> <span class="identifier">t</span><span class="special">;</span>
+ <span class="identifier">accumulator</span><span class="special">::</span><span class="identifier">scoped_run</span> <span class="identifier">_</span><span class="special">(</span><span class="identifier">t</span><span class="special">);</span>
+ <span class="comment">// ...
+</span>
+ <span class="comment">// call to some function we don't want to measure
+</span> <span class="special">{</span>
+ <span class="identifier">accumulator</span><span class="special">::</span><span class="identifier">scoped_suspend</span> <span class="identifier">_</span><span class="special">(</span><span class="identifier">t</span><span class="special">);</span>
+ <span class="identifier">external_function</span><span class="special">();</span>
+ <span class="special">}</span>
+<span class="special">}</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.reporters.stopwatch_reporter_hpp.wstopwatch_reporter"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopwatch_reporter_hpp.wstopwatch_reporter" title="Template Class wstopwatch_reporter&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">wstopwatch_reporter</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<p>
+ class <code class="computeroutput"><span class="identifier">wstopwatch_reporter</span></code>
+ provides a everything a <code class="computeroutput"><span class="identifier">Stopwatch</span></code>
+ provides and it adds reporting capabilities that can be invoked in a
+ single line of code. The reporting is controleed by two parameters:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ format : The output format
+ </li>
+<li class="listitem">
+ places(precision): the number of decimal placess used.
+ </li>
+</ul></div>
+<p>
+ The default places is given by Formatter::default_places().
+ </p>
+<p>
+ The default format is given by Formatter::default_format().
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Stopwatch</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Formatter</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">wstopwatch_reporter</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">basic_wstopwatch_reporter</span><span class="special">&lt;</span><span class="identifier">Stopwatch</span><span class="special">,</span><span class="identifier">Formatter</span><span class="special">&gt;</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Stopwatch</span><span class="special">::</span><span class="identifier">clock</span> <span class="identifier">clock</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">Stopwatch</span> <span class="identifier">stopwatch</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">Formatter</span> <span class="identifier">formatter</span><span class="special">;</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">wstopwatch_reporter</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">wstopwatch_reporter</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">wstopwatch_reporter</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">wstopwatch_reporter</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">wstopwatch_reporter</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">wstopwatch_reporter</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">wstopwatch_reporter</span><span class="special">(</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">wstopwatch_reporter</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">wstopwatch_reporter</span><span class="special">(</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">wstopwatch_reporter</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="special">~</span><span class="identifier">wstopwatch_reporter</span><span class="special">();</span>
+
+ <span class="keyword">void</span> <span class="identifier">report</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">bool</span> <span class="identifier">reported</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
+
+
+ <span class="keyword">typedef</span> <span class="identifier">stopwatch_runner</span><span class="special">&lt;</span><span class="identifier">wstopwatch_reporter</span><span class="special">&lt;</span><span class="identifier">Stopwatch</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">scoped_run</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">stopwatch_suspender</span><span class="special">&lt;</span><span class="identifier">wstopwatch_reporter</span><span class="special">&lt;</span><span class="identifier">Stopwatch</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">scoped_suspend</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">stopwatch_resumer</span><span class="special">&lt;</span><span class="identifier">wstopwatch_reporter</span><span class="special">&lt;</span><span class="identifier">Stopwatch</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">scoped_resume</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+<p>
+ Usage
+ </p>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">f1</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">wstopwatch_reporter</span><span class="special">&lt;</span><span class="identifier">stopwatch_accumulator</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">accumulator</span><span class="special">;</span>
+ <span class="keyword">static</span> <span class="identifier">accumulator</span> <span class="identifier">t</span><span class="special">;</span>
+ <span class="identifier">accumulator</span><span class="special">::</span><span class="identifier">scoped_run</span> <span class="identifier">_</span><span class="special">(</span><span class="identifier">t</span><span class="special">);</span>
+ <span class="comment">// ...
+</span>
+ <span class="comment">// call to some function we don't want to measure
+</span> <span class="special">{</span>
+ <span class="identifier">accumulator</span><span class="special">::</span><span class="identifier">scoped_suspend</span> <span class="identifier">_</span><span class="special">(</span><span class="identifier">t</span><span class="special">);</span>
+ <span class="identifier">external_function</span><span class="special">();</span>
+ <span class="special">}</span>
+<span class="special">}</span>
+</pre>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono_stopwatches.reference.reporters.stopclock_hpp"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_hpp" title="Header &lt;boost/chrono/stopwatches/stopclock.hpp&gt;">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopclock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_hpp.basic_stopclock">Template
+ Class <code class="computeroutput"><span class="identifier">basic_stopclock</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_hpp.stopclock">Template
+ Class <code class="computeroutput"><span class="identifier">stopclock</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section">stopclock useful typedefs</span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_hpp.wstopclock">Template
+ Class <code class="computeroutput"><span class="identifier">wstopclock</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section">wstopclock useful typedefs</span></dt>
+</dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Formatter</span> <span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">basic_stopclock</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Formatter</span> <span class="special">&gt;</span> <span class="keyword">class</span> <a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_hpp.stopclock" title="Template Class stopclock&lt;&gt;"><code class="computeroutput"><span class="identifier">stopclock</span></code></a><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Formatter</span> <span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">wstopclock</span><span class="special">;</span>
+
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">&gt;</span> <span class="identifier">system_stopclock</span><span class="special">;</span>
+ <span class="preprocessor">#ifdef</span> <code class="computeroutput"><span class="identifier">BOOST_CHRONO_HAS_CLOCK_STEADY</span></code>
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">&gt;</span> <span class="identifier">steady_stopclock</span><span class="special">;</span>
+ <span class="preprocessor">#endif</span>
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">&gt;</span> <span class="identifier">high_resolution_stopclock</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">&gt;</span> <span class="identifier">process_real_cpu_stopclock</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">&gt;</span> <span class="identifier">process_user_cpu_stopclock</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">&gt;</span> <span class="identifier">process_system_cpu_stopclock</span><span class="special">;</span>
+
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">&gt;</span> <span class="identifier">system_wstopclock</span><span class="special">;</span>
+ <span class="preprocessor">#ifdef</span> <code class="computeroutput"><span class="identifier">BOOST_CHRONO_HAS_CLOCK_STEADY</span></code>
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">&gt;</span> <span class="identifier">steady_wstopclock</span><span class="special">;</span>
+ <span class="preprocessor">#endif</span>
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">&gt;</span> <span class="identifier">high_resolution_wstopclock</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">&gt;</span> <span class="identifier">process_real_cpu_wstopclock</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">&gt;</span> <span class="identifier">process_user_cpu_wstopclock</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">&gt;</span> <span class="identifier">process_system_cpu_wstopclock</span><span class="special">;</span>
+<span class="special">}}</span>
+</pre>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.reporters.stopclock_hpp.basic_stopclock"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_hpp.basic_stopclock" title="Template Class basic_stopclock&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">basic_stopclock</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<p>
+ <code class="computeroutput"><span class="identifier">basic_stopclock</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span><span class="identifier">Formatter</span><span class="special">&gt;</span></code>
+ template class is a shortcut of <code class="computeroutput"><span class="identifier">basic_stopwatch_reporter</span><span class="special">&lt;</span><span class="identifier">stopwatch</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span><span class="identifier">Formatter</span><span class="special">&gt;&gt;</span></code>
+ </p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Formatter</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">basic_stopclock</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">basic_stopwatch_reporter</span><span class="special">&lt;</span><span class="identifier">stopwatch</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;,</span> <span class="identifier">Formatter</span><span class="special">&gt;</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">Clock</span> <span class="identifier">clock</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">stopwatch</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;</span> <span class="identifier">stopwatch</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">Formatter</span> <span class="identifier">formatter</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Formatter</span><span class="special">::</span><span class="identifier">string_type</span> <span class="identifier">string_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Formatter</span><span class="special">::</span><span class="identifier">char_type</span> <span class="identifier">char_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Formatter</span><span class="special">::</span><span class="identifier">ostream_type</span> <span class="identifier">ostream_type</span><span class="special">;</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">basic_stopclock</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">basic_stopclock</span><span class="special">(</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">basic_stopclock</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">basic_stopclock</span><span class="special">(</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="identifier">basic_stopclock</span><span class="special">(</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="identifier">basic_stopclock</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="identifier">basic_stopclock</span><span class="special">(</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="identifier">basic_stopclock</span><span class="special">(</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="identifier">basic_stopclock</span><span class="special">(</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="identifier">basic_stopclock</span><span class="special">(</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">base_type</span><span class="special">::</span><span class="identifier">scoped_run</span> <span class="identifier">scoped_run</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">base_type</span><span class="special">::</span><span class="identifier">scoped_suspend</span> <span class="identifier">scoped_suspend</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">base_type</span><span class="special">::</span><span class="identifier">scoped_resume</span> <span class="identifier">scoped_resume</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.reporters.stopclock_hpp.stopclock"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_hpp.stopclock" title="Template Class stopclock&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">stopclock</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<p>
+ A stopclock is a stopwatch with the ability to report elapsed time on
+ an output stream. <code class="computeroutput"><span class="identifier">stopclock</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;</span></code> template class is a shortcut of
+ <code class="computeroutput"><span class="identifier">basic_stopclock</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">stopwatch_reporter_default_formatter</span><span class="special">&lt;</span><span class="identifier">stopwatch</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;&gt;::</span><span class="identifier">type</span><span class="special">&gt;</span></code> with a specific default formatter.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span>
+ <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">=</span><span class="identifier">process_cpu_clock</span>
+ <span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Formatter</span><span class="special">=</span><span class="keyword">typename</span> <span class="identifier">stopwatch_reporter_default_formatter</span><span class="special">&lt;</span><span class="identifier">stopwatch</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;&gt;::</span><span class="identifier">type</span>
+<span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">stopclock</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">basic_stopclock</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Formatter</span><span class="special">&gt;</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">Clock</span> <span class="identifier">clock</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">stopwatch</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;</span> <span class="identifier">stopwatch</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">Formatter</span> <span class="identifier">formatter</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Formatter</span><span class="special">::</span><span class="identifier">string_type</span> <span class="identifier">string_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Formatter</span><span class="special">::</span><span class="identifier">char_type</span> <span class="identifier">char_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Formatter</span><span class="special">::</span><span class="identifier">ostream_type</span> <span class="identifier">ostream_type</span><span class="special">;</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">stopclock</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">stopclock</span><span class="special">(</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">stopclock</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">stopclock</span><span class="special">(</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="identifier">stopclock</span><span class="special">(</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="identifier">stopclock</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="identifier">stopclock</span><span class="special">(</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="identifier">stopclock</span><span class="special">(</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="identifier">stopclock</span><span class="special">(</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="identifier">stopclock</span><span class="special">(</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">base_type</span><span class="special">::</span><span class="identifier">scoped_run</span> <span class="identifier">scoped_run</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">base_type</span><span class="special">::</span><span class="identifier">scoped_suspend</span> <span class="identifier">scoped_suspend</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">base_type</span><span class="special">::</span><span class="identifier">scoped_resume</span> <span class="identifier">scoped_resume</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.reporters.stopclock_hpp.typedefs"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_hpp.typedefs" title="stopclock useful typedefs"><code class="computeroutput"><span class="identifier">stopclock</span></code> useful typedefs</a>
+</h5></div></div></div>
+<p>
+ The library provides stopclock shortcuts for all the models of <code class="computeroutput"><span class="identifier">Clock</span></code>, replacing clock by stopclock.
+ </p>
+<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopclock</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">system_clock</span> <span class="special">&gt;</span>
+ <span class="identifier">system_stopwatch_stopclock</span><span class="special">;</span>
+<span class="preprocessor">#ifdef</span> <code class="computeroutput"><span class="identifier">BOOST_CHRONO_HAS_CLOCK_STEADY</span></code>
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopclock</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">steady_clock</span> <span class="special">&gt;</span>
+ <span class="identifier">steady_stopwatch_stopclock</span><span class="special">;</span>
+<span class="preprocessor">#endif</span>
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopclock</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">high_resolution_clock</span> <span class="special">&gt;</span>
+ <span class="identifier">high_resolution_stopclock</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopclock</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">process_real_cpu_clock</span> <span class="special">&gt;</span>
+ <span class="identifier">process_real_cpu_stopclock</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopclock</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">process_user_cpu_clock</span> <span class="special">&gt;</span>
+ <span class="identifier">process_user_cpu_stopclock</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopclock</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">process_system_cpu_clock</span> <span class="special">&gt;</span>
+ <span class="identifier">process_system_cpu_stopclock</span><span class="special">;</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.reporters.stopclock_hpp.wstopclock"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_hpp.wstopclock" title="Template Class wstopclock&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">wstopclock</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<p>
+ <code class="computeroutput"><span class="identifier">wstopclock</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;</span></code>
+ template class is a shortcut of <code class="computeroutput"><span class="identifier">basic_wstopclock</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">stopwatch_reporter_default_formatter</span><span class="special">&lt;</span><span class="identifier">stopwatch</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;&gt;::</span><span class="identifier">type</span><span class="special">&gt;</span></code> with a specific default formatter.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span>
+ <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">=</span><span class="identifier">process_cpu_clock</span>
+ <span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Formatter</span><span class="special">=</span><span class="keyword">typename</span> <span class="identifier">stopwatch_reporter_default_formatter</span><span class="special">&lt;</span><span class="identifier">stopwatch</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;&gt;::</span><span class="identifier">type</span>
+<span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">wstopclock</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">basic_wstopclock</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Formatter</span><span class="special">&gt;</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">Clock</span> <span class="identifier">clock</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">stopwatch</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;</span> <span class="identifier">stopwatch</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">Formatter</span> <span class="identifier">formatter</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Formatter</span><span class="special">::</span><span class="identifier">string_type</span> <span class="identifier">string_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Formatter</span><span class="special">::</span><span class="identifier">char_type</span> <span class="identifier">char_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Formatter</span><span class="special">::</span><span class="identifier">ostream_type</span> <span class="identifier">ostream_type</span><span class="special">;</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">wstopclock</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">wstopclock</span><span class="special">(</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">wstopclock</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">wstopclock</span><span class="special">(</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="identifier">wstopclock</span><span class="special">(</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="identifier">wstopclock</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="identifier">wstopclock</span><span class="special">(</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="identifier">wstopclock</span><span class="special">(</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="identifier">wstopclock</span><span class="special">(</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="identifier">wstopclock</span><span class="special">(</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">base_type</span><span class="special">::</span><span class="identifier">scoped_run</span> <span class="identifier">scoped_run</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">base_type</span><span class="special">::</span><span class="identifier">scoped_suspend</span> <span class="identifier">scoped_suspend</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">base_type</span><span class="special">::</span><span class="identifier">scoped_resume</span> <span class="identifier">scoped_resume</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.reporters.stopclock_hpp.wtypedefs"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_hpp.wtypedefs" title="wstopclock useful typedefs"><code class="computeroutput"><span class="identifier">wstopclock</span></code> useful typedefs</a>
+</h5></div></div></div>
+<p>
+ The library provides wstopclock shortcuts for all the models of <code class="computeroutput"><span class="identifier">Clock</span></code>, replacing clock by wstopclock.
+ </p>
+<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">wstopclock</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">system_clock</span> <span class="special">&gt;</span>
+ <span class="identifier">system_wstopclock</span><span class="special">;</span>
+<span class="preprocessor">#ifdef</span> <code class="computeroutput"><span class="identifier">BOOST_CHRONO_HAS_CLOCK_STEADY</span></code>
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">wstopclock</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">steady_clock</span> <span class="special">&gt;</span>
+ <span class="identifier">steady_wstopclock</span><span class="special">;</span>
+<span class="preprocessor">#endif</span>
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">wstopclock</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">high_resolution_clock</span> <span class="special">&gt;</span>
+ <span class="identifier">high_resolution_wstopclock</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">wstopclock</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">process_real_cpu_clock</span> <span class="special">&gt;</span>
+ <span class="identifier">process_real_cpu_wstopclock</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">wstopclock</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">process_user_cpu_clock</span> <span class="special">&gt;</span>
+ <span class="identifier">process_user_cpu_wstopclock</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">wstopclock</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">process_system_cpu_clock</span> <span class="special">&gt;</span>
+ <span class="identifier">process_system_cpu_wstopclock</span><span class="special">;</span>
+</pre>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono_stopwatches.reference.reporters.stopclock_accumulator_hpp"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_accumulator_hpp" title="Header &lt;boost/chrono/stopwatches/stopclock_accumulator.hpp&gt;">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopclock_accumulator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_accumulator_hpp.basic_stopclock_accumulator">Template
+ Class <code class="computeroutput"><span class="identifier">basic_stopclock_accumulator</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_accumulator_hpp.stopclock_accumulator">Template
+ Class <code class="computeroutput"><span class="identifier">stopclock_accumulator</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section">stopclock_accumulator useful typedefs</span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_accumulator_hpp.wstopclock_accumulator">Template
+ Class <code class="computeroutput"><span class="identifier">wstopclock_accumulator</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section">wstopclock_accumulator useful typedefs</span></dt>
+</dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Formatter</span> <span class="special">&gt;</span>
+ <span class="keyword">class</span> <span class="identifier">basic_stopclock_accumulator</span><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Formatter</span> <span class="special">&gt;</span>
+ <span class="keyword">class</span> <a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_accumulator_hpp.stopclock_accumulator" title="Template Class stopclock_accumulator&lt;&gt;"><code class="computeroutput"><span class="identifier">stopclock_accumulator</span></code></a><span class="special">;</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Formatter</span> <span class="special">&gt;</span>
+ <span class="keyword">class</span> <span class="identifier">wstopclock_accumulator</span><span class="special">;</span>
+
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">&gt;</span> <span class="identifier">system_stopclock_accumulator</span><span class="special">;</span>
+ <span class="preprocessor">#ifdef</span> <code class="computeroutput"><span class="identifier">BOOST_CHRONO_HAS_CLOCK_STEADY</span></code>
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">&gt;</span> <span class="identifier">steady_stopclock_accumulator</span><span class="special">;</span>
+ <span class="preprocessor">#endif</span>
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">&gt;</span> <span class="identifier">high_resolution_stopclock_accumulator</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">&gt;</span> <span class="identifier">process_real_cpu_stopclock_accumulator</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">&gt;</span> <span class="identifier">process_user_cpu_stopclock_accumulator</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">&gt;</span> <span class="identifier">process_system_cpu_stopclock_accumulator</span><span class="special">;</span>
+
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">&gt;</span> <span class="identifier">system_wstopclock_accumulator</span><span class="special">;</span>
+ <span class="preprocessor">#ifdef</span> <code class="computeroutput"><span class="identifier">BOOST_CHRONO_HAS_CLOCK_STEADY</span></code>
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">&gt;</span> <span class="identifier">steady_wstopclock_accumulator</span><span class="special">;</span>
+ <span class="preprocessor">#endif</span>
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">&gt;</span> <span class="identifier">high_resolution_wstopclock_accumulator</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">&gt;</span> <span class="identifier">process_real_cpu_wstopclock_accumulator</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">&gt;</span> <span class="identifier">process_user_cpu_wstopclock_accumulator</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="special">&lt;</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">&gt;</span> <span class="identifier">process_system_cpu_wstopclock_accumulator</span><span class="special">;</span>
+<span class="special">}}</span>
+</pre>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.reporters.stopclock_accumulator_hpp.basic_stopclock_accumulator"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_accumulator_hpp.basic_stopclock_accumulator" title="Template Class basic_stopclock_accumulator&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">basic_stopclock_accumulator</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<p>
+ <code class="computeroutput"><span class="identifier">basic_stopclock_accumulator</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;</span></code> template class is a shortcut of
+ <code class="computeroutput"><span class="identifier">basic_stopwatch_reporter</span><span class="special">&lt;</span><span class="identifier">stopwatch_accumulator</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;,</span> <span class="keyword">typename</span>
+ <span class="identifier">stopwatch_reporter_default_formatter</span><span class="special">&lt;</span><span class="identifier">stopwatch_accumulator</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;&gt;::</span><span class="identifier">type</span><span class="special">&gt;</span></code>
+ </p>
+<pre class="programlisting"><span class="keyword">template</span>
+ <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">=</span><span class="identifier">high_resolution_clock</span>
+ <span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Formatter</span><span class="special">=</span>
+ <span class="keyword">typename</span> <span class="identifier">stopwatch_reporter_default_formatter</span><span class="special">&lt;</span><span class="identifier">stopwatch_accumulator</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;&gt;::</span><span class="identifier">type</span>
+<span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">basic_stopclock_accumulator</span>
+ <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">basic_stopwatch_reporter</span><span class="special">&lt;</span><span class="identifier">stopwatch_accumulator</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;,</span> <span class="identifier">Formatter</span><span class="special">&gt;</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">Clock</span> <span class="identifier">clock</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">stopwatch_accumulator</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;</span> <span class="identifier">stopwatch</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">Formatter</span> <span class="identifier">formatter</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Formatter</span><span class="special">::</span><span class="identifier">string_type</span> <span class="identifier">string_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Formatter</span><span class="special">::</span><span class="identifier">char_type</span> <span class="identifier">char_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Formatter</span><span class="special">::</span><span class="identifier">ostream_type</span> <span class="identifier">ostream_type</span><span class="special">;</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">basic_stopclock_accumulator</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">basic_stopclock_accumulator</span><span class="special">(</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">basic_stopclock_accumulator</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">basic_stopclock_accumulator</span><span class="special">(</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="identifier">basic_stopclock_accumulator</span><span class="special">(</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="identifier">basic_stopclock_accumulator</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="identifier">basic_stopclock_accumulator</span><span class="special">(</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="identifier">basic_stopclock_accumulator</span><span class="special">(</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="identifier">basic_stopclock_accumulator</span><span class="special">(</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="identifier">basic_stopclock_accumulator</span><span class="special">(</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">base_type</span><span class="special">::</span><span class="identifier">scoped_run</span> <span class="identifier">scoped_run</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">base_type</span><span class="special">::</span><span class="identifier">scoped_suspend</span> <span class="identifier">scoped_suspend</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">base_type</span><span class="special">::</span><span class="identifier">scoped_resume</span> <span class="identifier">scoped_resume</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.reporters.stopclock_accumulator_hpp.stopclock_accumulator"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_accumulator_hpp.stopclock_accumulator" title="Template Class stopclock_accumulator&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">stopclock_accumulator</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<p>
+ <code class="computeroutput"><span class="identifier">stopclock_accumulator</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;</span></code> template class is a shortcut of
+ <code class="computeroutput"><span class="identifier">stopwatch_reporter</span><span class="special">&lt;</span><span class="identifier">stopwatch</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;&gt;</span></code>
+ with a specific formatter.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span>
+ <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">=</span><span class="identifier">high_resolution_clock</span>
+ <span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Formatter</span><span class="special">=</span>
+ <span class="keyword">typename</span> <span class="identifier">stopwatch_reporter_default_formatter</span><span class="special">&lt;</span><span class="identifier">stopwatch_accumulator</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;&gt;::</span><span class="identifier">type</span>
+<span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">stopclock_accumulator</span>
+ <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">basic_stopclock_accumulator</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Formatter</span><span class="special">&gt;</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">Clock</span> <span class="identifier">clock</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">stopwatch_accumulator</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;</span> <span class="identifier">stopwatch</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">Formatter</span> <span class="identifier">formatter</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Formatter</span><span class="special">::</span><span class="identifier">string_type</span> <span class="identifier">string_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Formatter</span><span class="special">::</span><span class="identifier">char_type</span> <span class="identifier">char_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Formatter</span><span class="special">::</span><span class="identifier">ostream_type</span> <span class="identifier">ostream_type</span><span class="special">;</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">stopclock_accumulator</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">stopclock_accumulator</span><span class="special">(</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">stopclock_accumulator</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">stopclock_accumulator</span><span class="special">(</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="identifier">stopclock_accumulator</span><span class="special">(</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="identifier">stopclock_accumulator</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="identifier">stopclock_accumulator</span><span class="special">(</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="identifier">stopclock_accumulator</span><span class="special">(</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="identifier">stopclock_accumulator</span><span class="special">(</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="identifier">stopclock_accumulator</span><span class="special">(</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">base_type</span><span class="special">::</span><span class="identifier">scoped_run</span> <span class="identifier">scoped_run</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">base_type</span><span class="special">::</span><span class="identifier">scoped_suspend</span> <span class="identifier">scoped_suspend</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">base_type</span><span class="special">::</span><span class="identifier">scoped_resume</span> <span class="identifier">scoped_resume</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.reporters.stopclock_accumulator_hpp.typedefs"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_accumulator_hpp.typedefs" title="stopclock_accumulator useful typedefs"><code class="computeroutput"><span class="identifier">stopclock_accumulator</span></code> useful typedefs</a>
+</h5></div></div></div>
+<p>
+ The library provides stopclock_accumulator shortcuts for all the models
+ of <code class="computeroutput"><span class="identifier">Clock</span></code>, replacing clock
+ by stopclock_accumulator.
+ </p>
+<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopclock_accumulator</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">system_clock</span> <span class="special">&gt;</span>
+ <span class="identifier">system_stopclock_accumulator</span><span class="special">;</span>
+<span class="preprocessor">#ifdef</span> <code class="computeroutput"><span class="identifier">BOOST_CHRONO_HAS_CLOCK_STEADY</span></code>
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopclock_accumulator</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">steady_clock</span> <span class="special">&gt;</span>
+ <span class="identifier">steady_stopclock_accumulator</span><span class="special">;</span>
+<span class="preprocessor">#endif</span>
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopclock_accumulator</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">high_resolution_clock</span> <span class="special">&gt;</span>
+ <span class="identifier">high_resolution_stopclock_accumulator</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopclock_accumulator</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">process_real_cpu_clock</span> <span class="special">&gt;</span>
+ <span class="identifier">process_real_cpu_stopclock_accumulator</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopclock_accumulator</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">process_user_cpu_clock</span> <span class="special">&gt;</span>
+ <span class="identifier">process_user_cpu_stopclock_accumulator</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopclock_accumulator</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">process_system_cpu_clock</span> <span class="special">&gt;</span>
+ <span class="identifier">process_system_cpu_stopclock_accumulator</span><span class="special">;</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.reporters.stopclock_accumulator_hpp.wstopclock_accumulator"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_accumulator_hpp.wstopclock_accumulator" title="Template Class wstopclock_accumulator&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">wstopclock_accumulator</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<p>
+ <code class="computeroutput"><span class="identifier">wstopclock_accumulator</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;</span></code> template class is a shortcut of
+ <code class="computeroutput"><span class="identifier">stopwatch_reporter</span><span class="special">&lt;</span><span class="identifier">stopwatch</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;&gt;</span></code>
+ with a specific formatter.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span>
+ <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">=</span><span class="identifier">high_resolution_clock</span>
+ <span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Formatter</span><span class="special">=</span>
+ <span class="keyword">typename</span> <span class="identifier">stopwatch_reporter_default_formatter</span><span class="special">&lt;</span><span class="identifier">stopwatch_accumulator</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;&gt;::</span><span class="identifier">type</span>
+<span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">wstopclock_accumulator</span>
+ <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">basic_wstopclock_accumulator</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Formatter</span><span class="special">&gt;</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">Clock</span> <span class="identifier">clock</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">stopwatch_accumulator</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;</span> <span class="identifier">stopwatch</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">Formatter</span> <span class="identifier">formatter</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Formatter</span><span class="special">::</span><span class="identifier">string_type</span> <span class="identifier">string_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Formatter</span><span class="special">::</span><span class="identifier">char_type</span> <span class="identifier">char_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Formatter</span><span class="special">::</span><span class="identifier">ostream_type</span> <span class="identifier">ostream_type</span><span class="special">;</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">wstopclock_accumulator</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">wstopclock_accumulator</span><span class="special">(</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">wstopclock_accumulator</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">wstopclock_accumulator</span><span class="special">(</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="identifier">wstopclock_accumulator</span><span class="special">(</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="identifier">wstopclock_accumulator</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="identifier">wstopclock_accumulator</span><span class="special">(</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="identifier">wstopclock_accumulator</span><span class="special">(</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="identifier">wstopclock_accumulator</span><span class="special">(</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="identifier">wstopclock_accumulator</span><span class="special">(</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">base_type</span><span class="special">::</span><span class="identifier">scoped_run</span> <span class="identifier">scoped_run</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">base_type</span><span class="special">::</span><span class="identifier">scoped_suspend</span> <span class="identifier">scoped_suspend</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">base_type</span><span class="special">::</span><span class="identifier">scoped_resume</span> <span class="identifier">scoped_resume</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.reporters.stopclock_accumulator_hpp.wtypedefs"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_accumulator_hpp.wtypedefs" title="wstopclock_accumulator useful typedefs"><code class="computeroutput"><span class="identifier">wstopclock_accumulator</span></code> useful typedefs</a>
+</h5></div></div></div>
+<p>
+ The library provides wstopclock_accumulator shortcuts for all the models
+ of <code class="computeroutput"><span class="identifier">Clock</span></code>, replacing clock
+ by wstopclock_accumulator.
+ </p>
+<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">wstopclock_accumulator</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">system_clock</span> <span class="special">&gt;</span>
+ <span class="identifier">system_wstopclock_accumulator</span><span class="special">;</span>
+<span class="preprocessor">#ifdef</span> <code class="computeroutput"><span class="identifier">BOOST_CHRONO_HAS_CLOCK_STEADY</span></code>
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">wstopclock_accumulator</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">steady_clock</span> <span class="special">&gt;</span>
+ <span class="identifier">steady_wstopclock_accumulator</span><span class="special">;</span>
+<span class="preprocessor">#endif</span>
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">wstopclock_accumulator</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">high_resolution_clock</span> <span class="special">&gt;</span>
+ <span class="identifier">high_resolution_wstopclock_accumulator</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">wstopclock_accumulator</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">process_real_cpu_clock</span> <span class="special">&gt;</span>
+ <span class="identifier">process_real_cpu_wstopclock_accumulator</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">wstopclock_accumulator</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">process_user_cpu_clock</span> <span class="special">&gt;</span>
+ <span class="identifier">process_user_cpu_wstopclock_accumulator</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">wstopclock_accumulator</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">process_system_cpu_clock</span> <span class="special">&gt;</span>
+ <span class="identifier">process_system_cpu_wstopclock_accumulator</span><span class="special">;</span>
+</pre>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono_stopwatches.reference.reporters.scoped_stopclock_hpp"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.scoped_stopclock_hpp" title="Header &lt;boost/chrono/stopwatches/scoped_stopclock.hpp&gt;">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">scoped_stopclock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.reporters.scoped_stopclock_hpp.scoped_stopclock">Template
+ Class <code class="computeroutput"><span class="identifier">scoped_stopclock</span><span class="special">&lt;&gt;</span></code></a></span></dt></dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Formatter</span> <span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">scoped_stopclock</span><span class="special">;</span>
+<span class="special">}}</span>
+</pre>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.reporters.scoped_stopclock_hpp.scoped_stopclock"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.scoped_stopclock_hpp.scoped_stopclock" title="Template Class scoped_stopclock&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">scoped_stopclock</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<p>
+ <code class="computeroutput"><span class="identifier">scoped_stopclock</span><span class="special">&lt;&gt;</span></code>is
+ like a <code class="computeroutput"><span class="identifier">stopclock</span><span class="special">&lt;&gt;</span></code>
+ but that in addition will output a scoped trace. At construction time
+ it will output
+ </p>
+<pre class="programlisting"><span class="special">{{{</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
+</pre>
+<p>
+ and at destruction time
+ </p>
+<pre class="programlisting"><span class="special">}}}</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span> <span class="special">&lt;</span><span class="identifier">output</span> <span class="identifier">of</span> <span class="identifier">stopwatch_reporter</span><span class="special">&gt;</span>
+</pre>
+<p>
+ A typical ussage of this class is
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">f1</span><span class="special">(</span><span class="keyword">long</span> <span class="identifier">j</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="identifier">scoped_stopclock</span><span class="special">&lt;&gt;</span> <span class="identifier">_</span><span class="special">(</span><span class="identifier">BOOST_CURRENT_FUNCTION</span><span class="special">);</span>
+
+ <span class="keyword">for</span> <span class="special">(</span> <span class="keyword">long</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="identifier">j</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span> <span class="special">)</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">sqrt</span><span class="special">(</span> <span class="number">123.456L</span> <span class="special">);</span> <span class="comment">// burn some time
+</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<a name="boost_chrono_stopwatches.reference.reporters.scoped_stopclock_hpp.scoped_stopclock.synopsis"></a><h6>
+<a name="idp18591040"></a>
+ <a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.scoped_stopclock_hpp.scoped_stopclock.synopsis">Synopsis</a>
+ </h6>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">=</span><span class="identifier">process_cpu_clock</span>
+ <span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Formatter</span><span class="special">=</span><span class="keyword">typename</span> <span class="identifier">stopwatch_reporter_default_formatter</span><span class="special">&lt;</span><span class="identifier">stopwatch</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;&gt;::</span><span class="identifier">type</span>
+<span class="special">&gt;</span> <span class="keyword">class</span> <span class="identifier">scoped_stopclock</span>
+ <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">stopwatch_reporter</span><span class="special">&lt;</span><span class="identifier">stopwatch</span><span class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;,</span> <span class="identifier">Formatter</span><span class="special">&gt;</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">Clock</span> <span class="identifier">clock</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">Stopwatch</span> <span class="identifier">stopwatch</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">Formatter</span> <span class="identifier">formatter</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Formatter</span><span class="special">::</span><span class="identifier">string_type</span> <span class="identifier">string_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Formatter</span><span class="special">::</span><span class="identifier">char_type</span> <span class="identifier">char_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Formatter</span><span class="special">::</span><span class="identifier">ostream_type</span> <span class="identifier">ostream_type</span><span class="special">;</span>
+
+ <span class="keyword">explicit</span> <span class="identifier">scoped_stopclock</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">func</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+ <span class="identifier">scoped_stopclock</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">func</span><span class="special">,</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="identifier">scoped_stopclock</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">func</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="identifier">scoped_stopclock</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">func</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="identifier">scoped_stopclock</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">func</span><span class="special">,</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="identifier">scoped_stopclock</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">func</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="identifier">scoped_stopclock</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">func</span><span class="special">,</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="identifier">scoped_stopclock</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">func</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="identifier">scoped_stopclock</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">func</span><span class="special">,</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="identifier">scoped_stopclock</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&amp;</span> <span class="identifier">func</span><span class="special">,</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="keyword">const</span> <span class="identifier">string_type</span> <span class="special">&amp;</span> <span class="identifier">format</span><span class="special">,</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">throws</span><span class="special">()</span> <span class="special">);</span>
+
+ <span class="special">~</span><span class="identifier">scoped_stopclock</span><span class="special">();</span>
+
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">base_type</span><span class="special">::</span><span class="identifier">scoped_run</span> <span class="identifier">scoped_run</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">base_type</span><span class="special">::</span><span class="identifier">scoped_suspend</span> <span class="identifier">scoped_suspend</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">base_type</span><span class="special">::</span><span class="identifier">scoped_resume</span> <span class="identifier">scoped_resume</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</div>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_chrono_stopwatches.reference.formatters"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.formatters" title="Stopwatch Formatters">Stopwatch
+ Formatters</a>
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.formatters.stopwatch_formatter_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopwatch_formatter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl><dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.formatters.stopwatch_formatter_hpp.basic_stopwatch_formatter">Template
+ Class <code class="computeroutput"><span class="identifier">basic_stopwatch_formatter</span><span class="special">&lt;&gt;</span></code></a></span></dt></dl></dd>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.formatters.stopwatch_accumulator_formatter_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopwatch_accumulator_formatter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.formatters.stopwatch_accumulator_formatter_hpp.basic_stopwatch_accumulator_formatter">Template
+ Class <code class="computeroutput"><span class="identifier">basic_stopwatch_accumulator_formatter</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.formatters.stopwatch_accumulator_formatter_hpp.typedefs"><code class="computeroutput"><span class="identifier">basic_stopwatch_accumulator_formatter</span></code>
+ useful typedefs</a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.formatters.time_formatter_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">time_formatter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.formatters.time_formatter_hpp.basic_time_formatter">Template
+ Class <code class="computeroutput"><span class="identifier">basic_time_formatter</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section">basic_time_formatter useful typedefs</span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.formatters.time_formatter_hpp.spec"><code class="computeroutput"><span class="identifier">stopwatch_reporter_default_formatter</span></code>
+ Specialization</a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.formatters.stopwatch_accumulator_time_formatter_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopwatch_accumulator_time_formatter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.formatters.stopwatch_accumulator_time_formatter_hpp.basic_stopwatch_accumulator_time_formatter">Template
+ Class <code class="computeroutput"><span class="identifier">basic_stopwatch_accumulator_time_formatter</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.formatters.stopwatch_accumulator_time_formatter_hpp.typedefs"><code class="computeroutput"><span class="identifier">basic_stopwatch_accumulator_time_formatter</span></code>
+ useful typedefs</a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.formatters.t24_hours_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">t24_hours</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl><dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.formatters.t24_hours_hpp.t24_hours">Class
+ <code class="computeroutput"><span class="identifier">t24_hours</span></code></a></span></dt></dl></dd>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.formatters.t24_hours_formatter_hpp">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">t24_hours_formatter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.formatters.t24_hours_formatter_hpp.basic_24_hours_formatter">Template
+ Class <code class="computeroutput"><span class="identifier">basic_24_hours_formatter</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section">basic_24_hours_formatter useful typedefs</span></dt>
+</dl></dd>
+</dl></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono_stopwatches.reference.formatters.stopwatch_formatter_hpp"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.formatters.stopwatch_formatter_hpp" title="Header &lt;boost/chrono/stopwatches/stopwatch_formatter.hpp&gt;">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopwatch_formatter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.formatters.stopwatch_formatter_hpp.basic_stopwatch_formatter">Template
+ Class <code class="computeroutput"><span class="identifier">basic_stopwatch_formatter</span><span class="special">&lt;&gt;</span></code></a></span></dt></dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">CharT</span><span class="special">=</span><span class="keyword">char</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">Traits</span><span class="special">=</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">char_traits</span><span class="special">&lt;</span><span class="identifier">CharT</span><span class="special">&gt;,</span>
+ <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">=</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">allocator</span><span class="special">&lt;</span><span class="identifier">CharT</span><span class="special">&gt;</span>
+ <span class="special">&gt;</span>
+ <span class="keyword">class</span> <span class="identifier">basic_stopwatch_formatter</span><span class="special">;</span>
+
+ <span class="keyword">typedef</span> <span class="identifier">basic_stopwatch_formatter</span><span class="special">&lt;</span><span class="keyword">char</span><span class="special">&gt;</span> <span class="identifier">stopwatch_formatter</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">basic_stopwatch_formatter</span><span class="special">&lt;</span><span class="keyword">wchar_t</span><span class="special">&gt;</span> <span class="identifier">wstopwatch_formatter</span><span class="special">;</span>
+<span class="special">}}</span>
+</pre>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.formatters.stopwatch_formatter_hpp.basic_stopwatch_formatter"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.formatters.stopwatch_formatter_hpp.basic_stopwatch_formatter" title="Template Class basic_stopwatch_formatter&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">basic_stopwatch_formatter</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<p>
+ <code class="computeroutput"><span class="identifier">stopwatch_formatter</span></code> is
+ a model of <a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.formatter_req" title="Formatter Requirements"><code class="computeroutput"><span class="identifier">Formatter</span></code></a>.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">CharT</span><span class="special">=</span><span class="keyword">char</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">Traits</span><span class="special">=</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">char_traits</span><span class="special">&lt;</span><span class="identifier">CharT</span><span class="special">&gt;,</span>
+ <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">=</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">allocator</span><span class="special">&lt;</span><span class="identifier">CharT</span><span class="special">&gt;</span>
+<span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">basic_stopwatch_formatter</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">CharT</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;</span> <span class="identifier">string_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">CharT</span> <span class="identifier">char_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span><span class="identifier">CharT</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">&gt;</span> <span class="identifier">ostream_type</span><span class="special">;</span>
+ <span class="keyword">static</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">default_os</span><span class="special">();</span>
+ <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">char_type</span> <span class="special">*</span> <span class="identifier">default_format</span><span class="special">();</span>
+ <span class="keyword">static</span> <span class="keyword">int</span> <span class="identifier">default_places</span><span class="special">();</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span> <span class="keyword">class</span> <span class="identifier">Stopwatch</span> <span class="special">&gt;</span>
+ <span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">show_time</span><span class="special">(</span> <span class="identifier">Stopwatch</span> <span class="special">&amp;</span> <span class="identifier">stopwatch_</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">format</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span><span class="special">);</span>
+<span class="special">};</span>
+</pre>
+<p>
+ The default places is given by default_places and is 3.
+ </p>
+<p>
+ The default format is "%ts\n", where
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+ <code class="computeroutput"><span class="special">%</span><span class="identifier">d</span></code>
+ : the result of elapsed() when the reporting is done.
+ </li></ul></div>
+<p>
+ The time is given using the suffix "s" following the System
+ International d'Unites Std.
+ </p>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono_stopwatches.reference.formatters.stopwatch_accumulator_formatter_hpp"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.formatters.stopwatch_accumulator_formatter_hpp" title="Header &lt;boost/chrono/stopwatches/stopwatch_accumulator_formatter.hpp&gt;">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopwatch_accumulator_formatter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.formatters.stopwatch_accumulator_formatter_hpp.basic_stopwatch_accumulator_formatter">Template
+ Class <code class="computeroutput"><span class="identifier">basic_stopwatch_accumulator_formatter</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.formatters.stopwatch_accumulator_formatter_hpp.typedefs"><code class="computeroutput"><span class="identifier">basic_stopwatch_accumulator_formatter</span></code>
+ useful typedefs</a></span></dt>
+</dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">CharT</span><span class="special">=</span><span class="keyword">char</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">Traits</span><span class="special">=</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">char_traits</span><span class="special">&lt;</span><span class="identifier">CharT</span><span class="special">&gt;,</span>
+ <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">=</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">allocator</span><span class="special">&lt;</span><span class="identifier">CharT</span><span class="special">&gt;</span>
+ <span class="special">&gt;</span> <span class="identifier">basic_stopwatch_accumulator_formatter</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">basic_stopwatch_accumulator_formatter</span><span class="special">&lt;</span><span class="keyword">char</span><span class="special">&gt;</span> <span class="identifier">stopwatch_accumulator_formatter</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">basic_stopwatch_accumulator_formatter</span><span class="special">&lt;</span><span class="keyword">wchar_t</span><span class="special">&gt;</span> <span class="identifier">wstopwatch_accumulator_formatter</span><span class="special">;</span>
+<span class="special">}}</span>
+</pre>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.formatters.stopwatch_accumulator_formatter_hpp.basic_stopwatch_accumulator_formatter"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.formatters.stopwatch_accumulator_formatter_hpp.basic_stopwatch_accumulator_formatter" title="Template Class basic_stopwatch_accumulator_formatter&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">basic_stopwatch_accumulator_formatter</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<p>
+ <code class="computeroutput"><span class="identifier">basic_stopwatch_accumulator_formatter</span></code>
+ is a model of <a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.formatter_req" title="Formatter Requirements"><code class="computeroutput"><span class="identifier">Formatter</span></code></a>
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">CharT</span><span class="special">=</span><span class="keyword">char</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">Traits</span><span class="special">=</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">char_traits</span><span class="special">&lt;</span><span class="identifier">CharT</span><span class="special">&gt;,</span>
+ <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">=</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">allocator</span><span class="special">&lt;</span><span class="identifier">CharT</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">basic_stopwatch_accumulator_formatter</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">CharT</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;</span> <span class="identifier">string_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">CharT</span> <span class="identifier">char_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span><span class="identifier">CharT</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">&gt;</span> <span class="identifier">ostream_type</span><span class="special">;</span>
+ <span class="keyword">static</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">default_os</span><span class="special">();</span>
+ <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">char_type</span> <span class="special">*</span> <span class="identifier">default_format</span><span class="special">();</span>
+ <span class="keyword">static</span> <span class="keyword">int</span> <span class="identifier">default_places</span><span class="special">();</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Stopwatch</span> <span class="special">&gt;</span>
+ <span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">show_time</span><span class="special">(</span> <span class="identifier">Stopwatch</span> <span class="special">&amp;</span> <span class="identifier">stopwatch_</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">format</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span><span class="special">);</span>
+<span class="special">};</span>
+</pre>
+<p>
+ The default places is given by default_places and is 3.
+ </p>
+<p>
+ The default format is "%c times, sum<code class="literal">%ss, min</code>%ms,
+ max<code class="literal">%Ms, mean</code>%as, frequency<code class="literal">%fHz, lifetime</code>%ls,
+ percentage=%p%\n", where
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ <code class="computeroutput"><span class="special">%</span><span class="identifier">c</span></code>
+ : the counter of the number of times the pair srat/stop has been
+ called.
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="special">%</span><span class="identifier">s</span></code>
+ : the sum of the samples of elapsed time between the call to start/stop.
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="special">%</span><span class="identifier">m</span></code>
+ : the min of the samples of elapsed time between the call to start/stop.
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="special">%</span><span class="identifier">M</span></code>
+ : the max of the samples of elapsed time between the call to start/stop.
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="special">%</span><span class="identifier">a</span></code>
+ : the mean of the samples of elapsed time between the call to start/stop.
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="special">%</span><span class="identifier">f</span></code>
+ : the frequency of calls to start.
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="special">%</span><span class="identifier">l</span></code>
+ : the lifetime of the stopwatch_accumulator.
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="special">%</span><span class="identifier">p</span></code>
+ : the percentage of time spent by this stopwatch respect to its lifetime.
+ </li>
+</ul></div>
+<p>
+ The time is given using the suffix "s", the frequency is given
+ using the suffix "Hz", both following the System International
+ d'Unites Std.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.formatters.stopwatch_accumulator_formatter_hpp.typedefs"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.formatters.stopwatch_accumulator_formatter_hpp.typedefs" title="basic_stopwatch_accumulator_formatter useful typedefs"><code class="computeroutput"><span class="identifier">basic_stopwatch_accumulator_formatter</span></code>
+ useful typedefs</a>
+</h5></div></div></div>
+<p>
+ The library provides basic_stopwatch_accumulator_formatter shortcuts
+ for char and wchar_t.
+ </p>
+<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">basic_stopwatch_accumulator_formatter</span><span class="special">&lt;</span><span class="keyword">char</span><span class="special">&gt;</span>
+ <span class="identifier">stopwatch_accumulator_formatter</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">basic_stopwatch_accumulator_formatter</span><span class="special">&lt;</span><span class="keyword">wchar_t</span><span class="special">&gt;</span>
+ <span class="identifier">wstopwatch_accumulator_formatter</span><span class="special">;</span>
+</pre>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono_stopwatches.reference.formatters.time_formatter_hpp"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.formatters.time_formatter_hpp" title="Header &lt;boost/chrono/stopwatches/time_formatter.hpp&gt;">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">time_formatter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.formatters.time_formatter_hpp.basic_time_formatter">Template
+ Class <code class="computeroutput"><span class="identifier">basic_time_formatter</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section">basic_time_formatter useful typedefs</span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.formatters.time_formatter_hpp.spec"><code class="computeroutput"><span class="identifier">stopwatch_reporter_default_formatter</span></code>
+ Specialization</a></span></dt>
+</dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">CharT</span><span class="special">=</span><span class="keyword">char</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">Traits</span><span class="special">=</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">char_traits</span><span class="special">&lt;</span><span class="identifier">CharT</span><span class="special">&gt;,</span>
+ <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">=</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">allocator</span><span class="special">&lt;</span><span class="identifier">CharT</span><span class="special">&gt;</span>
+ <span class="special">&gt;</span>
+ <span class="keyword">class</span> <span class="identifier">basic_time_formatter</span><span class="special">;</span>
+
+ <span class="keyword">typedef</span> <span class="identifier">basic_time_formatter</span><span class="special">&lt;</span><span class="keyword">char</span><span class="special">&gt;</span> <span class="identifier">time_formatter</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">basic_time_formatter</span><span class="special">&lt;</span><span class="keyword">wchar_t</span><span class="special">&gt;</span> <span class="identifier">wtime_formatter</span><span class="special">;</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">stopwatch_reporter_default_formatter</span><span class="special">&lt;</span><span class="identifier">stopwatch</span><span class="special">&lt;</span><span class="identifier">process_cpu_clock</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">time_formatter</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+
+<span class="special">}</span> <span class="special">}</span>
+</pre>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.formatters.time_formatter_hpp.basic_time_formatter"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.formatters.time_formatter_hpp.basic_time_formatter" title="Template Class basic_time_formatter&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">basic_time_formatter</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<p>
+ <code class="computeroutput"><span class="identifier">basic_time_formatter</span></code>
+ is a model of <a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.formatter_req" title="Formatter Requirements"><code class="computeroutput"><span class="identifier">Formatter</span></code></a>.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">CharT</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">basic_time_formatter</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">CharT</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;</span> <span class="identifier">string_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">CharT</span> <span class="identifier">char_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span><span class="identifier">CharT</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">&gt;</span> <span class="identifier">ostream_type</span><span class="special">;</span>
+ <span class="keyword">static</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">default_os</span><span class="special">();</span>
+ <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">char_type</span> <span class="special">*</span> <span class="identifier">default_format</span><span class="special">();</span>
+ <span class="keyword">static</span> <span class="keyword">int</span> <span class="identifier">default_places</span><span class="special">();</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Stopwatch</span> <span class="special">&gt;</span>
+ <span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">show_time</span><span class="special">(</span> <span class="identifier">Stopwatch</span> <span class="special">&amp;</span> <span class="identifier">stopwatch_</span>
+ <span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">format</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> <span class="identifier">os</span>
+ <span class="special">,</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span><span class="special">);</span>
+<span class="special">};</span>
+</pre>
+<p>
+ The default places is given by default_places and is 3.
+ </p>
+<p>
+ The default format is "nreal %rs, cpu %cs (%p%), user %us, system
+ %ss\n", where
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ <code class="computeroutput"><span class="special">%</span><span class="identifier">r</span></code>
+ : real process clock
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="special">%</span><span class="identifier">u</span></code>
+ : user process clock
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="special">%</span><span class="identifier">s</span></code>
+ : system process clock
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="special">%</span><span class="identifier">c</span></code>
+ : user+system process clock
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="special">%</span><span class="identifier">p</span></code>
+ : percentage (user+system)/real process clock
+ </li>
+</ul></div>
+<p>
+ All the units are given using the suffix "s" following the
+ System International d'Unites Std.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.formatters.time_formatter_hpp.typedefs"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.formatters.time_formatter_hpp.typedefs" title="basic_time_formatter useful typedefs"><code class="computeroutput"><span class="identifier">basic_time_formatter</span></code> useful typedefs</a>
+</h5></div></div></div>
+<p>
+ The library provides basic_time_formatter shortcuts for char and wchar_t.
+ </p>
+<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">basic_time_formatter</span><span class="special">&lt;</span><span class="keyword">char</span><span class="special">&gt;</span> <span class="identifier">time_formatter</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">basic_time_formatter</span><span class="special">&lt;</span><span class="keyword">wchar_t</span><span class="special">&gt;</span> <span class="identifier">wtime_formatter</span><span class="special">;</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.formatters.time_formatter_hpp.spec"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.formatters.time_formatter_hpp.spec" title="stopwatch_reporter_default_formatter Specialization"><code class="computeroutput"><span class="identifier">stopwatch_reporter_default_formatter</span></code>
+ Specialization</a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">stopwatch_reporter_default_formatter</span><span class="special">&lt;</span><span class="identifier">stopwatch</span><span class="special">&lt;</span><span class="identifier">process_cpu_clock</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="identifier">time_formatter</span> <span class="identifier">type</span><span class="special">;</span>
+<span class="special">};</span>
+</pre>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono_stopwatches.reference.formatters.stopwatch_accumulator_time_formatter_hpp"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.formatters.stopwatch_accumulator_time_formatter_hpp" title="Header &lt;boost/chrono/stopwatches/stopwatch_accumulator_time_formatter.hpp&gt;">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopwatch_accumulator_time_formatter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.formatters.stopwatch_accumulator_time_formatter_hpp.basic_stopwatch_accumulator_time_formatter">Template
+ Class <code class="computeroutput"><span class="identifier">basic_stopwatch_accumulator_time_formatter</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.formatters.stopwatch_accumulator_time_formatter_hpp.typedefs"><code class="computeroutput"><span class="identifier">basic_stopwatch_accumulator_time_formatter</span></code>
+ useful typedefs</a></span></dt>
+</dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">CharT</span><span class="special">=</span><span class="keyword">char</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">Traits</span><span class="special">=</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">char_traits</span><span class="special">&lt;</span><span class="identifier">CharT</span><span class="special">&gt;,</span>
+ <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">=</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">allocator</span><span class="special">&lt;</span><span class="identifier">CharT</span><span class="special">&gt;</span>
+ <span class="special">&gt;</span> <span class="identifier">basic_stopwatch_accumulator_time_formatter</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">basic_stopwatch_accumulator_time_formatter</span><span class="special">&lt;</span><span class="keyword">char</span><span class="special">&gt;</span> <span class="identifier">stopwatch_accumulator_time_formatter</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">basic_stopwatch_accumulator_time_formatter</span><span class="special">&lt;</span><span class="keyword">wchar_t</span><span class="special">&gt;</span> <span class="identifier">wstopwatch_accumulator_time_formatter</span><span class="special">;</span>
+<span class="special">}}</span>
+</pre>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.formatters.stopwatch_accumulator_time_formatter_hpp.basic_stopwatch_accumulator_time_formatter"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.formatters.stopwatch_accumulator_time_formatter_hpp.basic_stopwatch_accumulator_time_formatter" title="Template Class basic_stopwatch_accumulator_time_formatter&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">basic_stopwatch_accumulator_time_formatter</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<p>
+ <code class="computeroutput"><span class="identifier">basic_stopwatch_accumulator_time_formatter</span></code>
+ is a model of <a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.formatter_req" title="Formatter Requirements"><code class="computeroutput"><span class="identifier">Formatter</span></code></a>
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">CharT</span><span class="special">=</span><span class="keyword">char</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">Traits</span><span class="special">=</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">char_traits</span><span class="special">&lt;</span><span class="identifier">CharT</span><span class="special">&gt;,</span>
+ <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">=</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">allocator</span><span class="special">&lt;</span><span class="identifier">CharT</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">basic_stopwatch_accumulator_time_formatter</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span><span class="identifier">CharT</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">,</span><span class="identifier">Alloc</span><span class="special">&gt;</span> <span class="identifier">string_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">CharT</span> <span class="identifier">char_type</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span><span class="identifier">CharT</span><span class="special">,</span><span class="identifier">Traits</span><span class="special">&gt;</span> <span class="identifier">ostream_type</span><span class="special">;</span>
+ <span class="keyword">static</span> <span class="identifier">ostream_type</span> <span class="special">&amp;</span> <span class="identifier">default_os</span><span class="special">();</span>
+ <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">char_type</span> <span class="special">*</span> <span class="identifier">default_format</span><span class="special">();</span>
+ <span class="keyword">static</span> <span class="keyword">int</span> <span class="identifier">default_places</span><span class="special">();</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Stopwatch</span> <span class="special">&gt;</span>
+ <span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">show_time</span><span class="special">(</span> <span class="identifier">Stopwatch</span> <span class="special">&amp;</span> <span class="identifier">stopwatch_</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">format</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> <span class="identifier">os</span><span class="special">,</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span><span class="special">);</span>
+<span class="special">};</span>
+</pre>
+<p>
+ The default places is given by default_places and is 3.
+ </p>
+<p>
+ The default format is "%c times, sum<code class="literal">%s, min</code>%m,
+ max<code class="literal">%M, mean</code>%a, frequency<code class="literal">%fHz, lifetime</code>%ls,
+ percentage=%p%\n|real %rs, cpu %cs (%p%), user %us, system %ss",
+ where
+ </p>
+<p>
+ The part before the '|' corresponds to the accumulator format and the
+ part after corresponds to the times format, which will be used for the
+ sum, max, min and mean statistics.
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ <code class="computeroutput"><span class="special">%</span><span class="identifier">c</span></code>
+ : the counter of the number of times the pair srat/stop has been
+ called.
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="special">%</span><span class="identifier">s</span></code>
+ : the sum of the samples of elapsed time between the call to start/stop.
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="special">%</span><span class="identifier">m</span></code>
+ : the min of the samples of elapsed time between the call to start/stop.
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="special">%</span><span class="identifier">M</span></code>
+ : the max of the samples of elapsed time between the call to start/stop.
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="special">%</span><span class="identifier">a</span></code>
+ : the mean of the samples of elapsed time between the call to start/stop.
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="special">%</span><span class="identifier">f</span></code>
+ : the frequency of calls to start.
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="special">%</span><span class="identifier">l</span></code>
+ : the lifetime of the stopwatch_accumulator.
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="special">%</span><span class="identifier">p</span></code>
+ : the percentage of time spent by this stopwatch respect to its lifetime.
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="special">%</span><span class="identifier">r</span></code>
+ : real process clock
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="special">%</span><span class="identifier">u</span></code>
+ : user process clock
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="special">%</span><span class="identifier">s</span></code>
+ : system process clock
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="special">%</span><span class="identifier">c</span></code>
+ : user+system process clock
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="special">%</span><span class="identifier">p</span></code>
+ : percentage (user+system)/real process clock
+ </li>
+</ul></div>
+<p>
+ The time is given using the suffix "s", the frequency is given
+ using the suffix "Hz", both following the System International
+ d'Unites Std.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.formatters.stopwatch_accumulator_time_formatter_hpp.typedefs"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.formatters.stopwatch_accumulator_time_formatter_hpp.typedefs" title="basic_stopwatch_accumulator_time_formatter useful typedefs"><code class="computeroutput"><span class="identifier">basic_stopwatch_accumulator_time_formatter</span></code>
+ useful typedefs</a>
+</h5></div></div></div>
+<p>
+ The library provides basic_stopwatch_accumulator_time_formatter shortcuts
+ for char and wchar_t.
+ </p>
+<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">basic_stopwatch_accumulator_time_formatter</span><span class="special">&lt;</span><span class="keyword">char</span><span class="special">&gt;</span>
+ <span class="identifier">stopwatch_accumulator_time_formatter</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">basic_stopwatch_accumulator_time_formatter</span><span class="special">&lt;</span><span class="keyword">wchar_t</span><span class="special">&gt;</span>
+ <span class="identifier">wstopwatch_accumulator_time_formatter</span><span class="special">;</span>
+</pre>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono_stopwatches.reference.formatters.t24_hours_hpp"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.formatters.t24_hours_hpp" title="Header &lt;boost/chrono/stopwatches/t24_hours.hpp&gt;">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">t24_hours</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.formatters.t24_hours_hpp.t24_hours">Class
+ <code class="computeroutput"><span class="identifier">t24_hours</span></code></a></span></dt></dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
+ <span class="keyword">class</span> <span class="identifier">t24_hours</span><span class="special">;</span>
+<span class="special">}}</span>
+</pre>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.formatters.t24_hours_hpp.t24_hours"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.formatters.t24_hours_hpp.t24_hours" title="Class t24_hours">Class
+ <code class="computeroutput"><span class="identifier">t24_hours</span></code></a>
+</h5></div></div></div>
+<p>
+ <code class="computeroutput"><span class="identifier">t24_hours</span></code> helper class
+ decompose a duration in days, hours, minutes, seconds and nanoseconds.
+ It can be used through its static functions or creating an instance and
+ using its fields.
+ </p>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">t24_hours</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least32_t</span><span class="special">,</span> <code class="computeroutput"><span class="identifier">ratio</span></code><span class="special">&lt;</span><span class="number">24</span><span class="special">*</span><span class="number">3600</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">days</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">hours</span> <span class="identifier">hours</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">minutes</span> <span class="identifier">minutes</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">seconds</span> <span class="identifier">seconds</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">nanoseconds</span> <span class="identifier">nanoseconds</span><span class="special">;</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">&gt;</span>
+ <span class="keyword">static</span> <span class="identifier">days</span> <span class="identifier">get_days</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;&amp;</span> <span class="identifier">d</span><span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">&gt;</span>
+ <span class="keyword">static</span> <span class="identifier">hours</span> <span class="identifier">get_hours</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;&amp;</span> <span class="identifier">d</span><span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">&gt;</span>
+ <span class="keyword">static</span> <span class="identifier">minutes</span> <span class="identifier">get_minutes</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;&amp;</span> <span class="identifier">d</span><span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">&gt;</span>
+ <span class="keyword">static</span> <span class="identifier">seconds</span> <span class="identifier">get_seconds</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;&amp;</span> <span class="identifier">d</span><span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">&gt;</span>
+ <span class="keyword">static</span> <span class="identifier">nanoseconds</span> <span class="identifier">get_nanoseconds</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;&amp;</span> <span class="identifier">d</span><span class="special">);</span>
+
+ <span class="identifier">days</span> <span class="identifier">days_</span><span class="special">;</span>
+ <span class="identifier">hours</span> <span class="identifier">hours_</span><span class="special">;</span>
+ <span class="identifier">minutes</span> <span class="identifier">minutes_</span><span class="special">;</span>
+ <span class="identifier">seconds</span> <span class="identifier">seconds_</span><span class="special">;</span>
+ <span class="identifier">nanoseconds</span> <span class="identifier">nanoseconds_</span><span class="special">;</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">&gt;</span>
+ <span class="keyword">explicit</span> <span class="identifier">t24_hours</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special">&lt;</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">&gt;&amp;</span> <span class="identifier">d</span><span class="special">);</span>
+<span class="special">};</span>
+</pre>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono_stopwatches.reference.formatters.t24_hours_formatter_hpp"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.formatters.t24_hours_formatter_hpp" title="Header &lt;boost/chrono/stopwatches/t24_hours_formatter.hpp&gt;">Header
+ <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">t24_hours_formatter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="reference.html#boost_chrono_stopwatches.reference.formatters.t24_hours_formatter_hpp.basic_24_hours_formatter">Template
+ Class <code class="computeroutput"><span class="identifier">basic_24_hours_formatter</span><span class="special">&lt;&gt;</span></code></a></span></dt>
+<dt><span class="section">basic_24_hours_formatter useful typedefs</span></dt>
+</dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span>
+ <span class="keyword">typename</span> <span class="identifier">CharT</span><span class="special">=</span><span class="keyword">char</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">Traits</span><span class="special">=</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">char_traits</span><span class="special">&lt;</span><span class="identifier">CharT</span><span class="special">&gt;,</span>
+ <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">=</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">allocator</span><span class="special">&lt;</span><span class="identifier">CharT</span><span class="special">&gt;</span>
+ <span class="special">&gt;</span>
+ <span class="keyword">class</span> <span class="identifier">basic_24_hours_formatter</span><span class="special">;</span>
+
+ <span class="keyword">typedef</span> <span class="identifier">basic_24_hours_formatter</span><span class="special">&lt;</span><span class="keyword">char</span><span class="special">&gt;</span> <span class="identifier">t24_hours_formatter</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">basic_24_hours_formatter</span><span class="special">&lt;</span><span class="keyword">wchar_t</span><span class="special">&gt;</span> <span class="identifier">wt24_hours_formatter</span><span class="special">;</span>
+
+<span class="special">}</span> <span class="special">}</span>
+</pre>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.formatters.t24_hours_formatter_hpp.basic_24_hours_formatter"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.formatters.t24_hours_formatter_hpp.basic_24_hours_formatter" title="Template Class basic_24_hours_formatter&lt;&gt;">Template
+ Class <code class="computeroutput"><span class="identifier">basic_24_hours_formatter</span><span class="special">&lt;&gt;</span></code></a>
+</h5></div></div></div>
+<p>
+ <code class="computeroutput"><span class="identifier">basic_24_hours_formatter</span></code>
+ is a model of <a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.formatter_req" title="Formatter Requirements"><code class="computeroutput"><span class="identifier">Formatter</span></code></a>.
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">CharT</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Traits</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Alloc</span><span class="special">&gt;</span>
+<span class="keyword">class</span> <span class="identifier">basic_24_hours_formatter</span> <span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">static</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> <span class="identifier">default_os</span><span class="special">();</span>
+ <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">default_format</span><span class="special">();</span>
+ <span class="keyword">static</span> <span class="keyword">int</span> <span class="identifier">default_places</span><span class="special">();</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Stopwatch</span> <span class="special">&gt;</span>
+ <span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">show_time</span><span class="special">(</span> <span class="identifier">Stopwatch</span> <span class="special">&amp;</span> <span class="identifier">stopwatch_</span>
+ <span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">format</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&amp;</span> <span class="identifier">os</span>
+ <span class="special">,</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&amp;</span> <span class="identifier">ec</span><span class="special">);</span>
+<span class="special">};</span>
+</pre>
+<p>
+ The default places is given by default_places and is 3.
+ </p>
+<p>
+ The default format is "%d days(s) %h:%m:%s.%n\n", where
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ <code class="computeroutput"><span class="special">%</span><span class="identifier">d</span></code>
+ : days
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="special">%</span><span class="identifier">h</span></code>
+ : hours
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="special">%</span><span class="identifier">m</span></code>
+ : minutes
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="special">%</span><span class="identifier">s</span></code>
+ : seconds
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="special">%</span><span class="identifier">n</span></code>
+ : nanoseconds
+ </li>
+</ul></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.reference.formatters.t24_hours_formatter_hpp.typedefs"></a><a class="link" href="reference.html#boost_chrono_stopwatches.reference.formatters.t24_hours_formatter_hpp.typedefs" title="basic_24_hours_formatter useful typedefs"><code class="computeroutput"><span class="identifier">basic_24_hours_formatter</span></code> useful typedefs</a>
+</h5></div></div></div>
+<p>
+ The library provides basic_24_hours_formatter shortcuts for char and
+ wchar_t.
+ </p>
+<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">basic_24_hours_formatter</span><span class="special">&lt;</span><span class="keyword">char</span><span class="special">&gt;</span> <span class="identifier">t24_hours_formatter</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">basic_24_hours_formatter</span><span class="special">&lt;</span><span class="keyword">wchar_t</span><span class="special">&gt;</span> <span class="identifier">wt24_hours_formatter</span><span class="special">;</span>
+</pre>
+</div>
+</div>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2009 -2011 Vicente J. Botet Escriba<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="users_guide.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="appendices.html"><img src="../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/stopwatches/libs/chrono/stopwatches/doc/html/boost_chrono_stopwatches/users_guide.html
==============================================================================
--- (empty file)
+++ sandbox/stopwatches/libs/chrono/stopwatches/doc/html/boost_chrono_stopwatches/users_guide.html 2011-09-11 08:43:58 EDT (Sun, 11 Sep 2011)
@@ -0,0 +1,921 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Users'Guide</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.0">
+<link rel="home" href="../index.html" title="Boost.Chrono.Stopwatches 0.3.0">
+<link rel="up" href="../index.html" title="Boost.Chrono.Stopwatches 0.3.0">
+<link rel="prev" href="overview.html" title="Overview">
+<link rel="next" href="reference.html" title="Reference">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="overview.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="reference.html"><img src="../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_chrono_stopwatches.users_guide"></a><a class="link" href="users_guide.html" title="Users'Guide">Users'Guide</a>
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="users_guide.html#boost_chrono_stopwatches.users_guide.getting_started">Getting
+ Started</a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="users_guide.html#boost_chrono_stopwatches.users_guide.getting_started.install">Installing
+ <span class="bold"><strong>Boost.Chrono.Stopwatches</strong></span></a></span></dt>
+<dt><span class="section"><a href="users_guide.html#boost_chrono_stopwatches.users_guide.getting_started.hello">Hello
+ World! </a></span></dt>
+</dl></dd>
+<dt><span class="section">Tutorial</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="users_guide.html#boost_chrono_stopwatches.users_guide.tutorial.stopwatches_and_stopclocks">Stopwatches
+ and Stopclocks</a></span></dt>
+<dt><span class="section">Formatters</span></dt>
+</dl></dd>
+<dt><span class="section">Examples</span></dt>
+<dd><dl><dt><span class="section">Reporting</span></dt></dl></dd>
+</dl></div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_chrono_stopwatches.users_guide.getting_started"></a><a class="link" href="users_guide.html#boost_chrono_stopwatches.users_guide.getting_started" title="Getting Started">Getting
+ Started</a>
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="users_guide.html#boost_chrono_stopwatches.users_guide.getting_started.install">Installing
+ <span class="bold"><strong>Boost.Chrono.Stopwatches</strong></span></a></span></dt>
+<dt><span class="section"><a href="users_guide.html#boost_chrono_stopwatches.users_guide.getting_started.hello">Hello
+ World! </a></span></dt>
+</dl></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono_stopwatches.users_guide.getting_started.install"></a><a class="link" href="users_guide.html#boost_chrono_stopwatches.users_guide.getting_started.install" title="Installing Boost.Chrono.Stopwatches">Installing
+ <span class="bold"><strong>Boost.Chrono.Stopwatches</strong></span></a>
+</h4></div></div></div>
+<a name="boost_chrono_stopwatches.users_guide.getting_started.install.getting__emphasis_role__bold__boost_chrono_stopwatches__emphasis__"></a><h6>
+<a name="idp13532448"></a>
+ <a class="link" href="users_guide.html#boost_chrono_stopwatches.users_guide.getting_started.install.getting__emphasis_role__bold__boost_chrono_stopwatches__emphasis__">Getting
+ <span class="bold"><strong>Boost.Chrono.Stopwatches</strong></span> </a>
+ </h6>
+<p>
+ You can get the last stable release of <span class="bold"><strong>Boost.Chrono.Stopwatches</strong></span>
+ by downloading <code class="literal">stopwatches.zip</code> from the <a href="http://www.boost-consulting.com/vault/index.php?directory=System" target="_top">Boost
+ Vault</a>.
+ </p>
+<p>
+ You can also access the latest (unstable?) state from the <a href="http://svn.boost.org/svn/boost/sandbox/stopwatches" target="_top">Boost
+ Sandbox</a>, directories boost/chrono/stopwatches and libs/chrono/stopwatches.
+ Just go to here
+ and follow the instructions there for anonymous SVN access.
+ </p>
+<a name="boost_chrono_stopwatches.users_guide.getting_started.install.where_to_install__emphasis_role__bold__boost_chrono_stopwatches__emphasis___"></a><h6>
+<a name="idp13539712"></a>
+ <a class="link" href="users_guide.html#boost_chrono_stopwatches.users_guide.getting_started.install.where_to_install__emphasis_role__bold__boost_chrono_stopwatches__emphasis___">Where
+ to install <span class="bold"><strong>Boost.Chrono.Stopwatches</strong></span>?
+ </a>
+ </h6>
+<p>
+ The simple way is to decompress (or checkout from SVN) the file in your
+ BOOST_ROOT directory.
+ </p>
+<p>
+ Othesewise, if you decompress in a different directory, you will need to
+ comment some lines, and uncomment and change others in the build/Jamfile
+ and test/Jamfile. Sorry for this, but I have not reached yet to write a
+ Jamfile that is able to work in both environements and use the BOOST_ROOT
+ variable. Any help is welcome.
+ </p>
+<a name="boost_chrono_stopwatches.users_guide.getting_started.install.building__emphasis_role__bold__boost_chrono_stopwatches__emphasis__"></a><h6>
+<a name="idp13543872"></a>
+ <a class="link" href="users_guide.html#boost_chrono_stopwatches.users_guide.getting_started.install.building__emphasis_role__bold__boost_chrono_stopwatches__emphasis__">Building
+ <span class="bold"><strong>Boost.Chrono.Stopwatches</strong></span> </a>
+ </h6>
+<p>
+ <span class="bold"><strong>Boost.Chrono.Stopwatches</strong></span> is a header only
+ library.
+ </p>
+<a name="boost_chrono_stopwatches.users_guide.getting_started.install.requirements"></a><h6>
+<a name="idp13547568"></a>
+ <a class="link" href="users_guide.html#boost_chrono_stopwatches.users_guide.getting_started.install.requirements">Requirements</a>
+ </h6>
+<p>
+ <span class="bold"><strong>Boost.Chrono.Stopwatches</strong></span> depends on some
+ Boost libraries. For these specific parts you must use either Boost version
+ 1.44.0 or the version in SVN trunk (even if older versions should works
+ also).
+ </p>
+<p>
+ In particular, <span class="bold"><strong>Boost.Chrono.Stopwatches</strong></span>
+ depends on:
+ </p>
+<div class="variablelist">
+<p class="title"><b></b></p>
+<dl>
+<dt><span class="term">Boost.Chrono</span></dt>
+<dd><p>
+ for duration, time_point and clocks, ...
+ </p></dd>
+<dt><span class="term">Boost.Config</span></dt>
+<dd><p>
+ for configuration purposes, ...
+ </p></dd>
+<dt><span class="term">Boost.Exception</span></dt>
+<dd><p>
+ for throw_exception, ...
+ </p></dd>
+<dt><span class="term">Boost.MPL</span></dt>
+<dd><p>
+ for MPL Assert and bool, ...
+ </p></dd>
+<dt><span class="term">Boost.System</span></dt>
+<dd><p>
+ for error_code, ...
+ </p></dd>
+<dt><span class="term">Boost.Input/Output</span></dt>
+<dd><p>
+ for io_state, ...
+ </p></dd>
+<dt><span class="term">Boost.StaticAssert</span></dt>
+<dd><p>
+ for STATIC_ASSERT, ...
+ </p></dd>
+<dt><span class="term">Boost.TypeTraits</span></dt>
+<dd><p>
+ for is_same, ...
+ </p></dd>
+<dt><span class="term">Boost.Utility</span></dt>
+<dd><p>
+ for base_from_memeber, ...
+ </p></dd>
+</dl>
+</div>
+<p>
+ <span class="bold"><strong>Boost.Chrono.Stopwatches</strong></span> depends optionally
+ on:
+ </p>
+<div class="variablelist">
+<p class="title"><b></b></p>
+<dl>
+<dt><span class="term">Boost.Thread</span></dt>
+<dd><p>
+ for thread_specific_ptr when suspendible_clock.hpp is included
+ </p></dd>
+<dt><span class="term">Boost.Accumulator</span></dt>
+<dd><p>
+ for accumulator_set, and statistics features when stopwatch_accumulator.hpp
+ is included
+ </p></dd>
+</dl>
+</div>
+<a name="boost_chrono_stopwatches.users_guide.getting_started.install.building_an_executable_that_uses__emphasis_role__bold__boost_chrono_stopwatches__emphasis__"></a><h6>
+<a name="idp13579776"></a>
+ <a class="link" href="users_guide.html#boost_chrono_stopwatches.users_guide.getting_started.install.building_an_executable_that_uses__emphasis_role__bold__boost_chrono_stopwatches__emphasis__">Building
+ an executable that uses <span class="bold"><strong>Boost.Chrono.Stopwatches</strong></span>
+ </a>
+ </h6>
+<p>
+ In addition to linking with the Boost.Chrono library you need also to link
+ with the Boost.System library. If you use Suspendible clocks you will need
+ also with Boost.Thread.
+ </p>
+<a name="boost_chrono_stopwatches.users_guide.getting_started.install.exceptions_safety_"></a><h6>
+<a name="idp13583120"></a>
+ <a class="link" href="users_guide.html#boost_chrono_stopwatches.users_guide.getting_started.install.exceptions_safety_">Exceptions
+ safety </a>
+ </h6>
+<p>
+ All functions in the library are exception-neutral and provide strong guarantee
+ of exception safety as long as the underlying parameters provide it.
+ </p>
+<a name="boost_chrono_stopwatches.users_guide.getting_started.install.thread_safety_"></a><h6>
+<a name="idp13585712"></a>
+ <a class="link" href="users_guide.html#boost_chrono_stopwatches.users_guide.getting_started.install.thread_safety_">Thread
+ safety </a>
+ </h6>
+<p>
+ All functions in the library are thread-unsafe except when noted explicitly.
+ </p>
+<a name="boost_chrono_stopwatches.users_guide.getting_started.install.tested_compilers_"></a><h6>
+<a name="idp13588224"></a>
+ <a class="link" href="users_guide.html#boost_chrono_stopwatches.users_guide.getting_started.install.tested_compilers_">Tested
+ compilers </a>
+ </h6>
+<p>
+ The implementation will eventually work with most C++03 conforming compilers.
+ Current version has been tested on:
+ </p>
+<p>
+ Windows with
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+ MSVC 10.0
+ </li></ul></div>
+<p>
+ Cygwin 1.5 with
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+ GCC 3.4.4
+ </li></ul></div>
+<p>
+ Cygwin 1.7 with
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+ GCC 4.3.4
+ </li></ul></div>
+<p>
+ MinGW with
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ GCC 4.4.0
+ </li>
+<li class="listitem">
+ GCC 4.5.0
+ </li>
+<li class="listitem">
+ GCC 4.5.0 -std=c++0x
+ </li>
+<li class="listitem">
+ GCC 4.6.0
+ </li>
+<li class="listitem">
+ GCC 4.6.0 -std=c++0x
+ </li>
+</ul></div>
+<p>
+ Ubuntu 10.10
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ GCC 4.4.5
+ </li>
+<li class="listitem">
+ GCC 4.4.5 -std=c++0x
+ </li>
+<li class="listitem">
+ GCC 4.5.1
+ </li>
+<li class="listitem">
+ GCC 4.5.1 -std=c++0x
+ </li>
+<li class="listitem">
+ clang 2.8
+ </li>
+</ul></div>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ Please let us know how this works on other platforms/compilers.
+ </p></td></tr>
+</table></div>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ Please send any questions, comments and bug reports to boost &lt;at&gt;
+ lists &lt;dot&gt; boost &lt;dot&gt; org.
+ </p></td></tr>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono_stopwatches.users_guide.getting_started.hello"></a><a class="link" href="users_guide.html#boost_chrono_stopwatches.users_guide.getting_started.hello" title="Hello World!">Hello
+ World! </a>
+</h4></div></div></div>
+<p>
+ If all you want to do is to time a program's execution:
+ </p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopclock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+
+<span class="special">...</span>
+
+<span class="comment">// add this in the scope you want to time,
+</span><span class="comment">// at the point you want the timer to start.
+</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_hpp.stopclock" title="Template Class stopclock&lt;&gt;"><code class="computeroutput"><span class="identifier">stopclock</span></code></a><span class="special">&lt;&gt;</span> <span class="identifier">rt</span><span class="special">;</span>
+</pre>
+<p>
+ Here is a complete program (stopclock_example.cpp):
+ </p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopclock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">cmath</span><span class="special">&gt;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_hpp.stopclock" title="Template Class stopclock&lt;&gt;"><code class="computeroutput"><span class="identifier">stopclock</span></code></a><span class="special">&lt;&gt;</span> <span class="identifier">t</span><span class="special">;</span>
+
+ <span class="keyword">for</span> <span class="special">(</span> <span class="keyword">long</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="number">10000000</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span> <span class="special">)</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">sqrt</span><span class="special">(</span> <span class="number">123.456L</span> <span class="special">);</span> <span class="comment">// burn some time
+</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ Debug build output was:
+ </p>
+<pre class="programlisting"><span class="identifier">real</span> <span class="number">0.832</span><span class="identifier">s</span><span class="special">,</span> <span class="identifier">cpu</span> <span class="number">0.813</span><span class="identifier">s</span> <span class="special">(</span><span class="number">97.7</span><span class="special">%),</span> <span class="identifier">user</span> <span class="number">0.813</span><span class="identifier">s</span><span class="special">,</span> <span class="identifier">system</span> <span class="number">0.000</span><span class="identifier">s</span>
+</pre>
+<p>
+ In other words, the program took 0.832 real-time (i.e. wall clock) seconds
+ to execute, while the operating system (Windows in this case) charged 0.813
+ seconds of CPU time to the user and 0 seconds to the system. The total
+ CPU time reported was 0.813 seconds, and that represented utilization of
+ 97.7% of the real-time seconds.
+ </p>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_chrono_stopwatches.users_guide.tutorial"></a><a class="link" href="users_guide.html#boost_chrono_stopwatches.users_guide.tutorial" title="Tutorial">Tutorial</a>
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="users_guide.html#boost_chrono_stopwatches.users_guide.tutorial.stopwatches_and_stopclocks">Stopwatches
+ and Stopclocks</a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="users_guide.html#boost_chrono_stopwatches.users_guide.tutorial.stopwatches_and_stopclocks.accumulators">Stopwatches
+ accumulation and statistics</a></span></dt>
+<dt><span class="section"><a href="users_guide.html#boost_chrono_stopwatches.users_guide.tutorial.stopwatches_and_stopclocks.function">How
+ can I prefix each report with <code class="computeroutput"><span class="identifier">BOOST_CURRENT_FUNCTION</span></code>
+ function signature?</a></span></dt>
+<dt><span class="section"><a href="users_guide.html#boost_chrono_stopwatches.users_guide.tutorial.stopwatches_and_stopclocks.file_line">How
+ can I prefix each report with <code class="computeroutput"><span class="identifier">__FILE__</span><span class="special">[</span><span class="identifier">__LINE__</span><span class="special">]</span></code> pattern?</a></span></dt>
+<dt><span class="section"><a href="users_guide.html#boost_chrono_stopwatches.users_guide.tutorial.stopwatches_and_stopclocks.non_static_acc">Can
+ I use an stopclock accumulator which is not static?</a></span></dt>
+<dt><span class="section"><a href="users_guide.html#boost_chrono_stopwatches.users_guide.tutorial.stopwatches_and_stopclocks.suspend">How
+ can I suspend a stopwatch?</a></span></dt>
+<dt><span class="section"><a href="users_guide.html#boost_chrono_stopwatches.users_guide.tutorial.stopwatches_and_stopclocks.stats">How
+ to get specific statistics from stopwatches accumulator?</a></span></dt>
+</dl></dd>
+<dt><span class="section">Formatters</span></dt>
+<dd><dl><dt><span class="section"><a href="users_guide.html#boost_chrono_stopwatches.users_guide.tutorial.formatters.other">How
+ can I make a specific formatter when the default do not satisfy my expectations</a></span></dt></dl></dd>
+</dl></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono_stopwatches.users_guide.tutorial.stopwatches_and_stopclocks"></a><a class="link" href="users_guide.html#boost_chrono_stopwatches.users_guide.tutorial.stopwatches_and_stopclocks" title="Stopwatches and Stopclocks">Stopwatches
+ and Stopclocks</a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="users_guide.html#boost_chrono_stopwatches.users_guide.tutorial.stopwatches_and_stopclocks.accumulators">Stopwatches
+ accumulation and statistics</a></span></dt>
+<dt><span class="section"><a href="users_guide.html#boost_chrono_stopwatches.users_guide.tutorial.stopwatches_and_stopclocks.function">How
+ can I prefix each report with <code class="computeroutput"><span class="identifier">BOOST_CURRENT_FUNCTION</span></code>
+ function signature?</a></span></dt>
+<dt><span class="section"><a href="users_guide.html#boost_chrono_stopwatches.users_guide.tutorial.stopwatches_and_stopclocks.file_line">How
+ can I prefix each report with <code class="computeroutput"><span class="identifier">__FILE__</span><span class="special">[</span><span class="identifier">__LINE__</span><span class="special">]</span></code> pattern?</a></span></dt>
+<dt><span class="section"><a href="users_guide.html#boost_chrono_stopwatches.users_guide.tutorial.stopwatches_and_stopclocks.non_static_acc">Can
+ I use an stopclock accumulator which is not static?</a></span></dt>
+<dt><span class="section"><a href="users_guide.html#boost_chrono_stopwatches.users_guide.tutorial.stopwatches_and_stopclocks.suspend">How
+ can I suspend a stopwatch?</a></span></dt>
+<dt><span class="section"><a href="users_guide.html#boost_chrono_stopwatches.users_guide.tutorial.stopwatches_and_stopclocks.stats">How
+ to get specific statistics from stopwatches accumulator?</a></span></dt>
+</dl></div>
+<p>
+ Knowing how long a program, a function or a specific block takes to execute
+ is useful in both test and production environments. <span class="bold"><strong>Boost.Chrono.Stopwatches</strong></span>
+ introduces the <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req" title="Stopwatch Requirements"><code class="computeroutput"><span class="identifier">Stopwatch</span></code></a> concept which captures
+ the mechanism to measure the elapsed time. A <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req" title="Stopwatch Requirements"><code class="computeroutput"><span class="identifier">Stopwatch</span></code></a> allows to <code class="computeroutput"><span class="identifier">start</span></code>, <code class="computeroutput"><span class="identifier">stop</span></code>,
+ <code class="computeroutput"><span class="identifier">suspend</span></code> and <code class="computeroutput"><span class="identifier">resume</span></code> measuring the elapsed time. <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp.stopwatch" title="Template Class stopwatch&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch</span></code></a><code class="computeroutput"><span class="special">&lt;&gt;</span></code>
+ is the basic model of <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_req" title="Stopwatch Requirements"><code class="computeroutput"><span class="identifier">Stopwatch</span></code></a> allowing to make a single
+ measure.
+ </p>
+<p>
+ At the user level, the main use case of measuring the elapsed time is to
+ report these measures on the display. <a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopwatch_reporter_hpp.stopwatch_reporter" title="Template Class stopwatch_reporter&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch_reporter</span></code></a><code class="computeroutput"><span class="special">&lt;&gt;</span></code> provides a run time reporting package
+ that can be invoked in a single line of code to report the usage of a
+ <code class="computeroutput"><span class="identifier">Clock</span></code>. For example
+ </p>
+<pre class="programlisting"><span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">;</span>
+
+<span class="keyword">int</span> <span class="identifier">f1</span><span class="special">(</span><span class="keyword">long</span> <span class="identifier">j</span><span class="special">)</span> <span class="special">{</span>
+ <a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopwatch_reporter_hpp.stopwatch_reporter" title="Template Class stopwatch_reporter&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch_reporter</span></code></a><span class="special">&lt;</span><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp.stopwatch" title="Template Class stopwatch&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch</span></code></a><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">_</span><span class="special">;</span>
+
+ <span class="keyword">for</span> <span class="special">(</span> <span class="keyword">long</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="identifier">j</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span> <span class="special">)</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">sqrt</span><span class="special">(</span> <span class="number">123.456L</span> <span class="special">);</span> <span class="comment">// burn some time
+</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">f1</span><span class="special">(</span><span class="number">100000</span><span class="special">);</span>
+ <span class="identifier">f1</span><span class="special">(</span><span class="number">200000</span><span class="special">);</span>
+ <span class="identifier">f1</span><span class="special">(</span><span class="number">300000</span><span class="special">);</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ Will produce the following output
+ </p>
+<pre class="programlisting"><span class="number">0.006</span><span class="identifier">s</span>
+<span class="number">0.011</span><span class="identifier">s</span>
+<span class="number">0.017</span><span class="identifier">s</span>
+</pre>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.users_guide.tutorial.stopwatches_and_stopclocks.accumulators"></a><a class="link" href="users_guide.html#boost_chrono_stopwatches.users_guide.tutorial.stopwatches_and_stopclocks.accumulators" title="Stopwatches accumulation and statistics">Stopwatches
+ accumulation and statistics</a>
+</h5></div></div></div>
+<p>
+ The preceding stopwatch manage only with a measure. It is also interesting
+ to have an statistical view of these times, for example the sum, min,
+ max and mean. <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_accumulator_hpp.stopwatch_accumulator" title="Template Class stopwatch_accumulator&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch_accumulator</span></code></a><code class="computeroutput"><span class="special">&lt;&gt;</span></code> associates an accumulator with
+ a <a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp.stopwatch" title="Template Class stopwatch&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch</span></code></a>, so we are able to
+ retrieve any statistical feature Boost.Accumulator provides.
+ </p>
+<p>
+ For example
+ </p>
+<pre class="programlisting"><span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">;</span>
+
+<span class="keyword">int</span> <span class="identifier">f1</span><span class="special">(</span><span class="keyword">long</span> <span class="identifier">j</span><span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">static</span> <a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopwatch_reporter_hpp.stopwatch_reporter" title="Template Class stopwatch_reporter&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch_reporter</span></code></a><span class="special">&lt;</span><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_accumulator_hpp.stopwatch_accumulator" title="Template Class stopwatch_accumulator&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch_accumulator</span></code></a><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">sw</span><span class="special">;</span>
+ <a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopwatch_reporter_hpp.stopwatch_reporter" title="Template Class stopwatch_reporter&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch_reporter</span></code></a><span class="special">&lt;</span><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_accumulator_hpp.stopwatch_accumulator" title="Template Class stopwatch_accumulator&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch_accumulator</span></code></a><span class="special">&lt;&gt;</span> <span class="special">&gt;::</span><span class="identifier">scoped_run</span> <span class="identifier">_</span><span class="special">(</span><span class="identifier">sw</span><span class="special">);</span>
+
+ <span class="keyword">for</span> <span class="special">(</span> <span class="keyword">long</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="identifier">j</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span> <span class="special">)</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">sqrt</span><span class="special">(</span> <span class="number">123.456L</span> <span class="special">);</span> <span class="comment">// burn some time
+</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">f1</span><span class="special">(</span><span class="number">100000</span><span class="special">);</span>
+ <span class="identifier">f1</span><span class="special">(</span><span class="number">200000</span><span class="special">);</span>
+ <span class="identifier">f1</span><span class="special">(</span><span class="number">300000</span><span class="special">);</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ Will produce the following output
+ </p>
+<pre class="programlisting"><span class="number">3</span> <span class="identifier">times</span><span class="special">,</span> <span class="identifier">sum</span><span class="special">=</span><span class="number">0.034</span><span class="identifier">s</span><span class="special">,</span> <span class="identifier">min</span><span class="special">=</span><span class="number">0.006</span><span class="identifier">s</span><span class="special">,</span> <span class="identifier">max</span><span class="special">=</span><span class="number">0.017</span><span class="identifier">s</span><span class="special">,</span> <span class="identifier">mean</span><span class="special">=</span><span class="number">0.011</span><span class="identifier">s</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.users_guide.tutorial.stopwatches_and_stopclocks.function"></a><a class="link" href="users_guide.html#boost_chrono_stopwatches.users_guide.tutorial.stopwatches_and_stopclocks.function" title="How can I prefix each report with BOOST_CURRENT_FUNCTION function signature?">How
+ can I prefix each report with <code class="computeroutput"><span class="identifier">BOOST_CURRENT_FUNCTION</span></code>
+ function signature?</a>
+</h5></div></div></div>
+<p>
+ You will need to give a specific format to your <a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_hpp.stopclock" title="Template Class stopclock&lt;&gt;"><code class="computeroutput"><span class="identifier">stopclock</span></code></a>. You just need to
+ concatenate your specific pattern to the default_format of the formatter.
+ </p>
+<p>
+ For example, for a <a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_accumulator_hpp.stopclock_accumulator" title="Template Class stopclock_accumulator&lt;&gt;"><code class="computeroutput"><span class="identifier">stopclock_accumulator</span></code></a> the default
+ formatter is <a class="link" href="reference.html#boost_chrono_stopwatches.reference.formatters.stopwatch_accumulator_formatter_hpp.basic_stopwatch_accumulator_formatter" title="Template Class basic_stopwatch_accumulator_formatter&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch_accumulator_formatter</span></code></a>,
+ you will need to do something like:
+ </p>
+<pre class="programlisting"><span class="keyword">static</span> <a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_accumulator_hpp.stopclock_accumulator" title="Template Class stopclock_accumulator&lt;&gt;"><code class="computeroutput"><span class="identifier">stopclock_accumulator</span></code></a><span class="special">&lt;&gt;</span> <span class="identifier">acc</span><span class="special">(</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="identifier">BOOST_CURRENT_FUNCTION</span><span class="special">)</span> <span class="special">+</span> <span class="string">": "</span>
+ <span class="special">+</span> <a class="link" href="reference.html#boost_chrono_stopwatches.reference.formatters.stopwatch_accumulator_formatter_hpp.basic_stopwatch_accumulator_formatter" title="Template Class basic_stopwatch_accumulator_formatter&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch_accumulator_formatter</span></code></a><span class="special">::</span><span class="identifier">default_format</span><span class="special">()</span>
+<span class="special">);</span>
+<a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_accumulator_hpp.stopclock_accumulator" title="Template Class stopclock_accumulator&lt;&gt;"><code class="computeroutput"><span class="identifier">stopclock_accumulator</span></code></a><span class="special">&lt;&gt;::</span><span class="identifier">scoped_run</span> <span class="identifier">_</span><span class="special">(</span><span class="identifier">acc</span><span class="special">);</span>
+</pre>
+<p>
+ Some of you will say that this is too long to type just to get the a
+ report. You can of course define your own macro as
+ </p>
+<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">REPORT_FUNCTION_ACCUMULATED_LIFETIME</span><span class="special">\</span>
+ <span class="keyword">static</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_accumulator_hpp.stopclock_accumulator" title="Template Class stopclock_accumulator&lt;&gt;"><code class="computeroutput"><span class="identifier">stopclock_accumulator</span></code></a><span class="special">&lt;&gt;</span> <span class="special">\</span>
+ <span class="identifier">BOOST_JOIN</span><span class="special">(</span><span class="identifier">_accumulator_</span><span class="special">,</span> <span class="identifier">__LINE__</span><span class="special">)</span><span class="identifier">_</span>
+ <span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="identifier">BOOST_CURRENT_FUNCTION</span><span class="special">)</span> <span class="special">+</span> <span class="string">": "</span> <span class="special">+</span> <span class="special">\</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><a class="link" href="reference.html#boost_chrono_stopwatches.reference.formatters.stopwatch_accumulator_formatter_hpp.basic_stopwatch_accumulator_formatter" title="Template Class basic_stopwatch_accumulator_formatter&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch_accumulator_formatter</span></code></a><span class="special">::</span><span class="identifier">default_format</span><span class="special">()</span> <span class="special">\</span>
+ <span class="special">);</span> <span class="special">\</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_accumulator_hpp.stopclock_accumulator" title="Template Class stopclock_accumulator&lt;&gt;"><code class="computeroutput"><span class="identifier">stopclock_accumulator</span></code></a><span class="special">&lt;&gt;::</span><span class="identifier">scoped_run</span> <span class="special">\</span>
+ <span class="identifier">BOOST_JOIN</span><span class="special">(</span><span class="identifier">_accumulator_run_</span><span class="special">,</span> <span class="identifier">__LINE__</span><span class="special">)</span> <span class="special">\</span>
+ <span class="special">(</span><span class="identifier">BOOST_JOIN</span><span class="special">(</span><span class="identifier">_accumulator_</span><span class="special">,</span> <span class="identifier">__LINE__</span><span class="special">))</span>
+</pre>
+<p>
+ With this macro you will just have to write
+ </p>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">foo</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">REPORT_FUNCTION_ACCUMULATED_LIFETIME</span><span class="special">()</span> <span class="special">;</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">this_thread</span><span class="special">::</span><span class="identifier">sleep</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">milliseconds</span><span class="special">(</span><span class="number">100</span><span class="special">));</span>
+ <span class="comment">// ...
+</span><span class="special">}</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.users_guide.tutorial.stopwatches_and_stopclocks.file_line"></a><a class="link" href="users_guide.html#boost_chrono_stopwatches.users_guide.tutorial.stopwatches_and_stopclocks.file_line" title="How can I prefix each report with __FILE__[__LINE__] pattern?">How
+ can I prefix each report with <code class="computeroutput"><span class="identifier">__FILE__</span><span class="special">[</span><span class="identifier">__LINE__</span><span class="special">]</span></code> pattern?</a>
+</h5></div></div></div>
+<p>
+ When you want to prefix with the <code class="computeroutput"><span class="identifier">__FILE__</span><span class="special">[</span><span class="identifier">__LINE__</span><span class="special">]</span></code> pattern you can follow the same technique
+ as described below:
+ </p>
+<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">REPORT_LINE_ACCUMULATED_LIFETIME</span> <span class="special">\</span>
+ <span class="keyword">static</span> <a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_accumulator_hpp.stopclock_accumulator" title="Template Class stopclock_accumulator&lt;&gt;"><code class="computeroutput"><span class="identifier">stopclock_accumulator</span></code></a><span class="special">&lt;&gt;</span>
+ <span class="identifier">BOOST_JOIN</span><span class="special">(</span><span class="identifier">_accumulator_</span><span class="special">,</span> <span class="identifier">__LINE__</span><span class="special">)</span> <span class="special">\</span>
+ <span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="identifier">__FILE__</span><span class="special">)</span> <span class="special">+</span> <span class="string">"["</span> <span class="special">+</span> <span class="identifier">BOOST_STRINGIZE</span><span class="special">(</span><span class="identifier">__LINE__</span><span class="special">)</span> <span class="special">+</span> <span class="string">"] "</span>
+ <span class="special">+</span> <a class="link" href="reference.html#boost_chrono_stopwatches.reference.formatters.stopwatch_accumulator_formatter_hpp.basic_stopwatch_accumulator_formatter" title="Template Class basic_stopwatch_accumulator_formatter&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch_accumulator_formatter</span></code></a><span class="special">::</span><span class="identifier">default_format</span><span class="special">()</span> <span class="special">\</span>
+ <span class="special">);</span> <span class="special">\</span>
+ <a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_accumulator_hpp.stopclock_accumulator" title="Template Class stopclock_accumulator&lt;&gt;"><code class="computeroutput"><span class="identifier">stopclock_accumulator</span></code></a><span class="special">&lt;&gt;::</span><span class="identifier">scoped_run</span> <span class="special">\</span>
+ <span class="identifier">BOOST_JOIN</span><span class="special">(</span><span class="identifier">_accumulator_run_</span><span class="special">,</span> <span class="identifier">__LINE__</span><span class="special">)</span>
+ <span class="special">(</span><span class="identifier">BOOST_JOIN</span><span class="special">(</span><span class="identifier">_accumulator_</span><span class="special">,</span> <span class="identifier">__LINE__</span><span class="special">))</span>
+</pre>
+<p>
+ Now you can mix fcntion and line reports as follows
+ </p>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">foo</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">REPORT_FUNCTION_ACCUMULATED_LIFETIME</span><span class="special">;</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">this_thread</span><span class="special">::</span><span class="identifier">sleep</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">milliseconds</span><span class="special">(</span><span class="number">100</span><span class="special">));</span>
+ <span class="special">{</span>
+ <span class="identifier">REPORT_LINE_ACCUMULATED_LIFETIME</span><span class="special">;</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">this_thread</span><span class="special">::</span><span class="identifier">sleep</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">milliseconds</span><span class="special">(</span><span class="number">200</span><span class="special">));</span>
+ <span class="special">}</span>
+
+<span class="special">}</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.users_guide.tutorial.stopwatches_and_stopclocks.non_static_acc"></a><a class="link" href="users_guide.html#boost_chrono_stopwatches.users_guide.tutorial.stopwatches_and_stopclocks.non_static_acc" title="Can I use an stopclock accumulator which is not static?">Can
+ I use an stopclock accumulator which is not static?</a>
+</h5></div></div></div>
+<p>
+ The typical example of stopclock_accumulator is to get statistical measures
+ of the time a function takes for each one of its calls. You can also
+ use <a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_accumulator_hpp.stopclock_accumulator" title="Template Class stopclock_accumulator&lt;&gt;"><code class="computeroutput"><span class="identifier">stopclock_accumulator</span></code></a> to get
+ statistical measures of the time a given loop takes for each one of its
+ laps.
+ </p>
+<pre class="programlisting"><a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_accumulator_hpp.stopclock_accumulator" title="Template Class stopclock_accumulator&lt;&gt;"><code class="computeroutput"><span class="identifier">stopclock_accumulator</span></code></a><span class="special">&lt;&gt;</span> <span class="identifier">acc</span><span class="special">(</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="identifier">__FILE__</span><span class="special">)</span> <span class="special">+</span> <span class="string">"["</span> <span class="special">+</span> <span class="identifier">BOOST_STRINGIZE</span><span class="special">(</span><span class="identifier">__LINE__</span><span class="special">)</span> <span class="special">+</span> <span class="string">"] "</span>
+ <span class="special">+</span> <a class="link" href="reference.html#boost_chrono_stopwatches.reference.formatters.stopwatch_accumulator_formatter_hpp.basic_stopwatch_accumulator_formatter" title="Template Class basic_stopwatch_accumulator_formatter&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch_accumulator_formatter</span></code></a><span class="special">::</span><span class="identifier">default_format</span><span class="special">()</span>
+<span class="special">);</span>
+<span class="keyword">for</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span><span class="special">=</span><span class="number">0</span><span class="special">;</span> <span class="identifier">i</span><span class="special">&lt;</span><span class="identifier">N</span><span class="special">;</span> <span class="identifier">i</span><span class="special">++)</span> <span class="special">{</span>
+ <a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopclock_accumulator_hpp.stopclock_accumulator" title="Template Class stopclock_accumulator&lt;&gt;"><code class="computeroutput"><span class="identifier">stopclock_accumulator</span></code></a><span class="special">&lt;&gt;::</span><span class="identifier">scoped_run</span> <span class="identifier">_</span><span class="special">(</span><span class="identifier">acc</span><span class="special">);</span>
+ <span class="comment">// ...
+</span><span class="special">}</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.users_guide.tutorial.stopwatches_and_stopclocks.suspend"></a><a class="link" href="users_guide.html#boost_chrono_stopwatches.users_guide.tutorial.stopwatches_and_stopclocks.suspend" title="How can I suspend a stopwatch?">How
+ can I suspend a stopwatch?</a>
+</h5></div></div></div>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatches</span><span class="special">/</span><span class="identifier">stopwatch</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">cmath</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">thread</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+
+
+<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">;</span>
+<span class="keyword">double</span> <span class="identifier">res</span><span class="special">;</span>
+<span class="keyword">void</span> <span class="identifier">f1</span><span class="special">(</span><span class="keyword">long</span> <span class="identifier">j</span><span class="special">)</span>
+<span class="special">{</span>
+ <a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopwatch_reporter_hpp.stopwatch_reporter" title="Template Class stopwatch_reporter&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch_reporter</span></code></a><span class="special">&lt;</span><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp.stopwatch" title="Template Class stopwatch&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch</span></code></a><span class="special">&lt;&gt;</span> <span class="special">&gt;::</span> <span class="identifier">_</span><span class="special">(</span><span class="identifier">BOOST_STOPWATCHES_STOPWATCH_FUNCTION_FORMAT</span><span class="special">);</span>
+ <span class="keyword">for</span> <span class="special">(</span><span class="keyword">long</span> <span class="identifier">i</span> <span class="special">=</span><span class="number">0</span><span class="special">;</span> <span class="identifier">i</span><span class="special">&lt;</span> <span class="identifier">j</span><span class="special">;</span> <span class="identifier">i</span><span class="special">+=</span><span class="number">1</span><span class="special">)</span>
+ <span class="identifier">res</span><span class="special">+=</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">sqrt</span><span class="special">(</span> <span class="identifier">res</span><span class="special">+</span><span class="number">123.456L</span><span class="special">+</span><span class="identifier">i</span> <span class="special">);</span> <span class="comment">// burn some time
+</span> <a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopwatch_reporter_hpp.stopwatch_reporter" title="Template Class stopwatch_reporter&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch_reporter</span></code></a><span class="special">&lt;</span><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_hpp.stopwatch" title="Template Class stopwatch&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch</span></code></a><span class="special">&lt;&gt;</span> <span class="special">&gt;::</span><span class="identifier">scoped_suspend</span> <span class="identifier">s</span><span class="special">(</span><span class="identifier">_</span><span class="special">);</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">this_thread</span><span class="special">::</span><span class="identifier">sleep</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">posix_time</span><span class="special">::</span><span class="identifier">milliseconds</span><span class="special">(</span><span class="number">200</span><span class="special">));</span>
+<span class="special">}</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.users_guide.tutorial.stopwatches_and_stopclocks.stats"></a><a class="link" href="users_guide.html#boost_chrono_stopwatches.users_guide.tutorial.stopwatches_and_stopclocks.stats" title="How to get specific statistics from stopwatches accumulator?">How
+ to get specific statistics from stopwatches accumulator?</a>
+</h5></div></div></div>
+<p>
+ There are two use cases that coul need to change the statistics associated
+ to a stopwatches accumulator:
+ </p>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+ We want to reduce the default reporting and we preffer to adapt the
+ statistics to the reporting
+ </li>
+<li class="listitem">
+ We want to report other statistics of the samples
+ </li>
+</ol></div>
+<p>
+ For the first case we just need to change the accumulator_set and the
+ format we want to get. Imagin we want to get only the count, sam and
+ mean statistics, no need to calculate the min neither the max.
+ </p>
+<pre class="programlisting"><span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">accumulators</span><span class="special">;</span>
+
+<span class="keyword">typedef</span> <a class="link" href="reference.html#boost_chrono_stopwatches.reference.reporters.stopwatch_reporter_hpp.stopwatch_reporter" title="Template Class stopwatch_reporter&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch_reporter</span></code></a><span class="special">&lt;</span><a class="link" href="reference.html#boost_chrono_stopwatches.reference.stopwatches.stopwatch_accumulator_hpp.stopwatch_accumulator" title="Template Class stopwatch_accumulator&lt;&gt;"><code class="computeroutput"><span class="identifier">stopwatch_accumulator</span></code></a><span class="special">&lt;</span><code class="computeroutput"><span class="identifier">process_real_cpu_clock</span></code><span class="special">,</span>
+ <span class="identifier">accumulator_set</span><span class="special">&lt;</span><code class="computeroutput"><span class="identifier">process_real_cpu_clock</span></code><span class="special">::</span><span class="identifier">rep</span><span class="special">,</span>
+ <span class="identifier">features</span><span class="special">&lt;</span>
+ <span class="identifier">tag</span><span class="special">::</span><span class="identifier">count</span><span class="special">,</span>
+ <span class="identifier">tag</span><span class="special">::</span><span class="identifier">sum</span><span class="special">,</span>
+ <span class="identifier">tag</span><span class="special">::</span><span class="identifier">mean</span>
+ <span class="special">&gt;</span>
+ <span class="special">&gt;</span>
+ <span class="special">&gt;</span> <span class="identifier">my_stopwatch_accumulator_reporter</span><span class="special">;</span>
+
+<span class="keyword">int</span> <span class="identifier">f1</span><span class="special">(</span><span class="keyword">long</span> <span class="identifier">j</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="keyword">static</span> <span class="identifier">my_stopwatch_accumulator_reporter</span> <span class="identifier">acc</span><span class="special">(</span><span class="string">"%c times, sum=%ss, mean=%as\n"</span><span class="special">);</span>
+ <span class="identifier">my_stopwatch_accumulator_reporter</span><span class="special">::</span><span class="identifier">scoped_run</span> <span class="identifier">_</span><span class="special">(</span><span class="identifier">acc</span><span class="special">);</span>
+
+ <span class="keyword">for</span> <span class="special">(</span> <span class="keyword">long</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="identifier">j</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span> <span class="special">)</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">sqrt</span><span class="special">(</span> <span class="number">123.456L</span> <span class="special">);</span> <span class="comment">// burn some time
+</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ But what would hapend if we haven't forced the format:
+ </p>
+<pre class="programlisting"><span class="keyword">static</span> <span class="identifier">my_stopwatch_accumulator_reporter</span> <span class="identifier">acc</span><span class="special">;</span>
+<span class="identifier">my_stopwatch_accumulator_reporter</span><span class="special">::</span><span class="identifier">scoped_run</span> <span class="identifier">_</span><span class="special">(</span><span class="identifier">acc</span><span class="special">);</span>
+</pre>
+<p>
+ Unfortunately there is no error at compile time. Fortunately, the run-time
+ execution is not undefined and will return 0 for the missing statistics.
+ </p>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono_stopwatches.users_guide.tutorial.formatters"></a><a class="link" href="users_guide.html#boost_chrono_stopwatches.users_guide.tutorial.formatters" title="Formatters">Formatters</a>
+</h4></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="users_guide.html#boost_chrono_stopwatches.users_guide.tutorial.formatters.other">How
+ can I make a specific formatter when the default do not satisfy my expectations</a></span></dt></dl></div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono_stopwatches.users_guide.tutorial.formatters.other"></a><a class="link" href="users_guide.html#boost_chrono_stopwatches.users_guide.tutorial.formatters.other" title="How can I make a specific formatter when the default do not satisfy my expectations">How
+ can I make a specific formatter when the default do not satisfy my expectations</a>
+</h5></div></div></div>
+<p>
+ Imagine then that we want to report the <code class="computeroutput"><span class="identifier">tag</span><span class="special">::</span><span class="identifier">variance</span><span class="special">(</span><span class="identifier">lazy</span><span class="special">)</span></code>. We will need to include the specific
+ accumulator file
+ </p>
+<pre class="programlisting"><span class="special">...</span>
+<span class="preprocessor">#include</spa