|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r59152 - in sandbox/chrono/libs/chrono: doc doc/html doc/html/boost_chrono doc/html/boost_chrono/appendices doc/html/boost_chrono/reference example test
From: vicente.botet_at_[hidden]
Date: 2010-01-20 03:34:44
Author: viboes
Date: 2010-01-20 03:34:43 EST (Wed, 20 Jan 2010)
New Revision: 59152
URL: http://svn.boost.org/trac/boost/changeset/59152
Log:
Boost.Chrono: Version 0.3.1,
* Adding uncommited stopclock_accumulator_example.cpp
* Update doc for forgotten stopclock_accumulator.hpp
Added:
sandbox/chrono/libs/chrono/example/stopclock_accumulator_example.cpp (contents, props changed)
Text files modified:
sandbox/chrono/libs/chrono/doc/chrono.qbk | 74 +++++++++++++++++++++++++++++++
sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/faq.html | 6 +-
sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/rationale.html | 8 +-
sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/todo.html | 4
sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference.html | 2
sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/stopwatch_reporters.html | 95 ++++++++++++++++++++++++++++++++++++++++
sandbox/chrono/libs/chrono/doc/html/index.html | 2
sandbox/chrono/libs/chrono/test/Jamfile.v2 | 2
8 files changed, 183 insertions(+), 10 deletions(-)
Modified: sandbox/chrono/libs/chrono/doc/chrono.qbk
==============================================================================
--- sandbox/chrono/libs/chrono/doc/chrono.qbk (original)
+++ sandbox/chrono/libs/chrono/doc/chrono.qbk 2010-01-20 03:34:43 EST (Wed, 20 Jan 2010)
@@ -2741,6 +2741,80 @@
[endsect]
[/==================================================]
+[section:stopclock_accumulator_hpp Header `<boost/chrono/stopclock_accumulator.hpp>`]
+[/==================================================]
+
+ namespace boost { namespace chrono {
+ template < class Clock, class Stopwatch, class Formatter >
+ class stopclock_accumulator;
+ typedef <see above> system_stopclock_accumulator;
+ #ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
+ typedef <see above> monotonic_stopclock_accumulator;
+ #endif
+ typedef <see above> high_resolution_stopclock_accumulator;
+ typedef <see above> process_real_cpu_stopclock_accumulator;
+ typedef <see above> process_user_cpu_stopclock_accumulator;
+ typedef <see above> process_system_cpu_stopclock_accumulator;
+ }}
+
+[section Template Class `stopclock_accumulator<>`]
+
+`stopclock_accumulator<Clock>` template class is a shortcut of `stopwatch_reporter<stopwatch<Clock>>`
+
+ template
+ < class Clock=high_resolution_clock
+ , class Stopwatch=stopwatch_accumulator<Clock>
+ , class Formatter=typename stopwatch_reporter_default_formatter<Stopwatch>::type
+ > class stopclock_accumulator : public stopwatch_reporter<Stopwatch, Formatter> {
+ public:
+ typedef Clock clock;
+ typedef Stopwatch stopwatch;
+ typedef Formatter formatter;
+
+ explicit stopclock_accumulator( system::error_code & ec = system::throws );
+ explicit stopclock_accumulator( std::ostream & os,
+ system::error_code & ec = system::throws );
+ explicit stopclock_accumulator( const std::string & format,
+ system::error_code & ec = system::throws );
+ explicit stopclock_accumulator( int places,
+ system::error_code & ec = system::throws );
+
+ stopclock_accumulator( std::ostream & os, const std::string & format,
+ system::error_code & ec = system::throws );
+ stopclock_accumulator( const std::string & format, int places,
+ system::error_code & ec = system::throws );
+ stopclock_accumulator( std::ostream & os, int places,
+ system::error_code & ec = system::throws );
+ stopclock_accumulator( int places, const std::string & format,
+ system::error_code & ec = system::throws );
+
+ stopclock_accumulator( std::ostream & os, const std::string & format, int places,
+ system::error_code & ec = system::throws );
+ stopclock_accumulator( std::ostream & os, int places, const std::string & format,
+ system::error_code & ec = system::throws );
+
+
+ typedef typename base_type::scoped_run scoped_run;
+ typedef typename base_type::scoped_suspend scoped_suspend;
+ typedef typename base_type::scoped_resume scoped_resume;
+ };
+
+[endsect]
+[section `stopclock_accumulator` useful typedefs]
+
+ typedef boost::chrono::stopclock_accumulator< boost::chrono::system_clock > system_stopwatch_reporter;
+ #ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
+ typedef boost::chrono::stopclock_accumulator< boost::chrono::monotonic_clock > monotonic_stopwatch_reporter;
+ #endif
+ typedef boost::chrono::stopclock_accumulator< boost::chrono::high_resolution_clock > high_resolution_stopclock_accumulator;
+ typedef boost::chrono::stopclock_accumulator< boost::chrono::process_real_cpu_clock > process_real_cpu_stopclock_accumulator;
+ typedef boost::chrono::stopclock_accumulator< boost::chrono::process_user_cpu_clock > process_user_cpu_stopclock_accumulator;
+ typedef boost::chrono::stopclock_accumulator< boost::chrono::process_system_cpu_clock > process_system_cpu_stopclock_accumulator;
+
+[endsect]
+[endsect]
+
+[/==================================================]
[section:function_stopclock_hpp Header `<boost/chrono/function_stopclock.hpp>`]
[/==================================================]
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/faq.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/faq.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/faq.html 2010-01-20 03:34:43 EST (Wed, 20 Jan 2010)
@@ -29,7 +29,7 @@
<a name="boost_chrono.appendices.faq"></a> Appendix D: FAQ
</h3></div></div></div>
<a name="boost_chrono.appendices.faq.how_important_is_the_order_of_the_common_type_lt__gt__template_arguments_"></a><h4>
-<a name="id4908665"></a>
+<a name="id4911186"></a>
<a href="faq.html#boost_chrono.appendices.faq.how_important_is_the_order_of_the_common_type_lt__gt__template_arguments_">How
important is the order of the common_type<> template arguments?</a>
</h4>
@@ -60,7 +60,7 @@
is also undefined.
</p>
<a name="boost_chrono.appendices.faq.why_does_stopwatch_reporter_only_display_millisecond_place_precision_when_the_underlying_timer_has_nanosecond_precision_"></a><h4>
-<a name="id4909076"></a>
+<a name="id4911596"></a>
<a href="faq.html#boost_chrono.appendices.faq.why_does_stopwatch_reporter_only_display_millisecond_place_precision_when_the_underlying_timer_has_nanosecond_precision_">Why
does stopwatch_reporter only display millisecond place precision when the
underlying timer has nanosecond precision?</a>
@@ -71,7 +71,7 @@
dangerously.
</p>
<a name="boost_chrono.appendices.faq.why_does_stopwatch_reporter_sometimes_report_more_cpu_seconds_than_real_seconds_"></a><h4>
-<a name="id4909117"></a>
+<a name="id4911637"></a>
<a href="faq.html#boost_chrono.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>
</h4>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/rationale.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/rationale.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/rationale.html 2010-01-20 03:34:43 EST (Wed, 20 Jan 2010)
@@ -33,7 +33,7 @@
are an extract from this document.
</p>
<a name="boost_chrono.appendices.rationale.is_it_possible_for_the_user_to_pass_a__code__phrase_role__identifier__duration__phrase___code__to_a_function_with_the_units_being_ambiguous_"></a><h4>
-<a name="id4907449"></a>
+<a name="id4909970"></a>
<a href="rationale.html#boost_chrono.appendices.rationale.is_it_possible_for_the_user_to_pass_a__code__phrase_role__identifier__duration__phrase___code__to_a_function_with_the_units_being_ambiguous_">Is
it possible for the user to pass a <code class="computeroutput"><span class="identifier">duration</span></code>
to a function with the units being ambiguous?</a>
@@ -45,7 +45,7 @@
<pre class="programlisting"><span class="identifier">f</span><span class="special">(</span><span class="number">3</span><span class="special">);</span> <span class="comment">// Will not compile, 3 is not implicitly convertible to any `duration`
</span></pre>
<a name="boost_chrono.appendices.rationale.why_duration_needs_operator_"></a><h4>
-<a name="id4907539"></a>
+<a name="id4910060"></a>
<a href="rationale.html#boost_chrono.appendices.rationale.why_duration_needs_operator_">Why
duration needs operator%</a>
</h4>
@@ -73,7 +73,7 @@
<span class="special">};</span>
</pre>
<a name="boost_chrono.appendices.rationale.why_ratio_needs_copyconstruction_and_assignment_from_ratios_having_the_same_normalized_form"></a><h4>
-<a name="id4908119"></a>
+<a name="id4910640"></a>
<a href="rationale.html#boost_chrono.appendices.rationale.why_ratio_needs_copyconstruction_and_assignment_from_ratios_having_the_same_normalized_form">Why
ratio needs CopyConstruction and Assignment from ratios having the same normalized
form</a>
@@ -101,7 +101,7 @@
ratio<1,3> and the compilation succeeds.
</p>
<a name="boost_chrono.appendices.rationale.why_ratio_needs_the_nested_normalizer_typedef_type"></a><h4>
-<a name="id4908433"></a>
+<a name="id4910953"></a>
<a href="rationale.html#boost_chrono.appendices.rationale.why_ratio_needs_the_nested_normalizer_typedef_type">Why
ratio needs the nested normalizer typedef type</a>
</h4>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/todo.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/todo.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/todo.html 2010-01-20 03:34:43 EST (Wed, 20 Jan 2010)
@@ -26,7 +26,7 @@
<a name="boost_chrono.appendices.todo"></a> Appendix H: Future plans
</h3></div></div></div>
<a name="boost_chrono.appendices.todo.tasks_to_do_before_review"></a><h4>
-<a name="id4911141"></a>
+<a name="id4913662"></a>
<a href="todo.html#boost_chrono.appendices.todo.tasks_to_do_before_review">Tasks
to do before review</a>
</h4>
@@ -59,7 +59,7 @@
<span class="identifier">high</span> <span class="identifier">resolution</span> <span class="identifier">timers</span> <span class="identifier">to</span> <span class="identifier">avoid</span> <span class="identifier">these</span> <span class="identifier">issues</span><span class="special">.</span>
</pre>
<a name="boost_chrono.appendices.todo.for_later_releases"></a><h4>
-<a name="id4911745"></a>
+<a name="id4914265"></a>
<a href="todo.html#boost_chrono.appendices.todo.for_later_releases">For later
releases</a>
</h4>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference.html 2010-01-20 03:34:43 EST (Wed, 20 Jan 2010)
@@ -65,6 +65,8 @@
Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatch_reporter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
<dt><span class="section"><a href="reference/stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.stopclock_hpp">
Header <code class="computeroutput"><span class="special"><</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">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
+<dt><span class="section"><a href="reference/stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.stopclock_accumulator_hpp">
+ Header <code class="computeroutput"><span class="special"><</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">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
<dt><span class="section"><a href="reference/stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.function_stopclock_hpp">
Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">function_stopclock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
</dl></dd>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/stopwatch_reporters.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/stopwatch_reporters.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/stopwatch_reporters.html 2010-01-20 03:34:43 EST (Wed, 20 Jan 2010)
@@ -44,6 +44,13 @@
Class <code class="computeroutput"><span class="identifier">stopclock</span><span class="special"><></span></code></a></span></dt>
<dt><span class="section">stopclock
useful typedefs</span></dt>
</dl></dd>
+<dt><span class="section"><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.stopclock_accumulator_hpp">
+ Header <code class="computeroutput"><span class="special"><</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">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.stopclock_accumulator_hpp.template_class__stopclock_accumulator___">Template
+ Class <code class="computeroutput"><span class="identifier">stopclock_accumulator</span><span class="special"><></span></code></a></span></dt>
+<dt><span class="section">stopclock_accumulator
useful typedefs</span></dt>
+</dl></dd>
<dt><span class="section"><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.function_stopclock_hpp">
Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">function_stopclock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
<dd><dl><dt><span class="section"><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.function_stopclock_hpp.template_class__function_stopclock___">Template
@@ -383,6 +390,94 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono.reference.stopwatch_reporters.stopclock_accumulator_hpp"></a><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.stopclock_accumulator_hpp" title="
+ Header <boost/chrono/stopclock_accumulator.hpp>">
+ Header <code class="computeroutput"><span class="special"><</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">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.stopclock_accumulator_hpp.template_class__stopclock_accumulator___">Template
+ Class <code class="computeroutput"><span class="identifier">stopclock_accumulator</span><span class="special"><></span></code></a></span></dt>
+<dt><span class="section">stopclock_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"><</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</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">class</span> <span class="identifier">stopclock_accumulator</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="special"><</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">></span> <span class="identifier">system_stopclock_accumulator</span><span class="special">;</span>
+ <span class="preprocessor">#ifdef</span> <span class="identifier">BOOST_CHRONO_HAS_CLOCK_MONOTONIC</span>
+ <span class="keyword">typedef</span> <span class="special"><</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">></span> <span class="identifier">monotonic_stopclock_accumulator</span><span class="special">;</span>
+ <span class="preprocessor">#endif</span>
+ <span class="keyword">typedef</span> <span class="special"><</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">></span> <span class="identifier">high_resolution_stopclock_accumulator</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="special"><</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">></span> <span class="identifier">process_real_cpu_stopclock_accumulator</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="special"><</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">></span> <span class="identifier">process_user_cpu_stopclock_accumulator</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="special"><</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">></span> <span class="identifier">process_system_cpu_stopclock_accumulator</span><span class="special">;</span>
+<span class="special">}}</span>
+</pre>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono.reference.stopwatch_reporters.stopclock_accumulator_hpp.template_class__stopclock_accumulator___"></a><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.stopclock_accumulator_hpp.template_class__stopclock_accumulator___" title="Template
+ Class stopclock_accumulator<>">Template
+ Class <code class="computeroutput"><span class="identifier">stopclock_accumulator</span><span class="special"><></span></code></a>
+</h5></div></div></div>
+<p>
+ <code class="computeroutput"><span class="identifier">stopclock_accumulator</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">></span></code> template class is a shortcut of
+ <code class="computeroutput"><span class="identifier">stopwatch_reporter</span><span class="special"><</span><span class="identifier">stopwatch</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">>></span></code>
+ </p>
+<pre class="programlisting"><span class="keyword">template</span>
+ <span class="special"><</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">Stopwatch</span><span class="special">=</span><span class="identifier">stopwatch_accumulator</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">></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"><</span><span class="identifier">Stopwatch</span><span class="special">>::</span><span class="identifier">type</span>
+<span class="special">></span> <span class="keyword">class</span> <span class="identifier">stopclock_accumulator</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">stopwatch_reporter</span><span class="special"><</span><span class="identifier">Stopwatch</span><span class="special">,</span> <span class="identifier">Formatter</span><span class="special">></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">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">&</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">throws</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">stopclock_accumulator</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&</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">&</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">throws</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">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&</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">&</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">throws</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">&</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">throws</span> <span class="special">);</span>
+
+ <span class="identifier">stopclock_accumulator</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&</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">&</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">&</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">throws</span> <span class="special">);</span>
+ <span class="identifier">stopclock_accumulator</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">&</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">&</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">throws</span> <span class="special">);</span>
+ <span class="identifier">stopclock_accumulator</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&</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">&</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">throws</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">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&</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">&</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">throws</span> <span class="special">);</span>
+
+ <span class="identifier">stopclock_accumulator</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&</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">&</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">&</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">throws</span> <span class="special">);</span>
+ <span class="identifier">stopclock_accumulator</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&</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">&</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">&</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">throws</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" lang="en">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="boost_chrono.reference.stopwatch_reporters.stopclock_accumulator_hpp._stopclock_accumulator__useful_typedefs"></a>stopclock_accumulator
useful typedefs
+</h5></div></div></div>
+<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"><</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">></span> <span class="identifier">system_stopwatch_reporter</span><span class="special">;</span>
+<span class="preprocessor">#ifdef</span> <span class="identifier">BOOST_CHRONO_HAS_CLOCK_MONOTONIC</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"><</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">monotonic_clock</span> <span class="special">></span> <span class="identifier">monotonic_stopwatch_reporter</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"><</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">></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"><</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">></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"><</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">></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"><</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">></span> <span class="identifier">process_system_cpu_stopclock_accumulator</span><span class="special">;</span>
+</pre>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
<a name="boost_chrono.reference.stopwatch_reporters.function_stopclock_hpp"></a><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.function_stopclock_hpp" title="
Header <boost/chrono/function_stopclock.hpp>">
Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">function_stopclock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
Modified: sandbox/chrono/libs/chrono/doc/html/index.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/index.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/index.html 2010-01-20 03:34:43 EST (Wed, 20 Jan 2010)
@@ -121,7 +121,7 @@
</table></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: January 19, 2010 at 23:33:30 GMT</small></p></td>
+<td align="left"><p><small>Last revised: January 20, 2010 at 08:21:53 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
Added: sandbox/chrono/libs/chrono/example/stopclock_accumulator_example.cpp
==============================================================================
--- (empty file)
+++ sandbox/chrono/libs/chrono/example/stopclock_accumulator_example.cpp 2010-01-20 03:34:43 EST (Wed, 20 Jan 2010)
@@ -0,0 +1,33 @@
+// stopwatch_accumulator_example.cpp ---------------------------------------------------//
+
+// Copyright Beman Dawes 2006, 2008
+
+// 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 for documentation.
+
+#include <boost/chrono/stopclock_accumulator.hpp>
+#include <cmath>
+
+using namespace boost::chrono;
+int f1(long j)
+{
+ static stopclock_accumulator<> acc(BOOST_CHRONO_ACCUMULATOR_FUNCTION_FORMAT);
+ stopclock_accumulator<>::scoped_run _(acc);
+
+ for ( long i = 0; i < j; ++i )
+ std::sqrt( 123.456L ); // burn some time
+
+ return 0;
+}
+int main()
+{
+ static stopclock_accumulator<> acc(BOOST_CHRONO_ACCUMULATOR_FUNCTION_FORMAT);
+ stopclock_accumulator<>::scoped_run _(acc);
+
+ f1(100000);
+ f1(200000);
+ f1(300000);
+ return 0;
+}
Modified: sandbox/chrono/libs/chrono/test/Jamfile.v2
==============================================================================
--- sandbox/chrono/libs/chrono/test/Jamfile.v2 (original)
+++ sandbox/chrono/libs/chrono/test/Jamfile.v2 2010-01-20 03:34:43 EST (Wed, 20 Jan 2010)
@@ -96,6 +96,8 @@
[ run ../example/stopwatch_accumulator_example.cpp : : : <library>/boost/system//boost_system : stopwatch_accumulator_example_dll ]
[ run ../example/stopclock_example.cpp : : : <link>static ]
[ run ../example/stopclock_example.cpp : : : <library>/boost/system//boost_system : stopclock_example_dll ]
+ [ run ../example/stopclock_accumulator_example.cpp : : : <link>static ]
+ [ run ../example/stopclock_accumulator_example.cpp : : : <library>/boost/system//boost_system : stopclock_accumulator_example_dll ]
[ run ../example/digital_time_example.cpp : : : <link>static ]
[ run ../example/digital_time_example.cpp : : : <library>/boost/system//boost_system : digital_time_example_dll ]
[ run ../example/function_stopclock_example.cpp : : : <link>static ]
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk