Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r59228 - in sandbox/chrono/libs/chrono: doc doc/html doc/html/boost_chrono doc/html/boost_chrono/appendices doc/html/boost_chrono/reference doc/html/boost_chrono/users_guide example test
From: vicente.botet_at_[hidden]
Date: 2010-01-22 13:37:37


Author: viboes
Date: 2010-01-22 13:37:35 EST (Fri, 22 Jan 2010)
New Revision: 59228
URL: http://svn.boost.org/trac/boost/changeset/59228

Log:
Boost.Chrono: Version 0.3.2,
* update some test
* update tutorial
Text files modified:
   sandbox/chrono/libs/chrono/doc/chrono.qbk | 137 ++++++++++++++++++++++++++++
   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/cpp0x.html | 2
   sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/other_clocks.html | 2
   sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/stopwatch_reporters.html | 2
   sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/stopwatches.html | 2
   sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide.html | 21 +++
   sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide/tutorial.html | 193 +++++++++++++++++++++++++++++++++++++++
   sandbox/chrono/libs/chrono/doc/html/index.html | 2
   sandbox/chrono/libs/chrono/example/nested_stopclock_accumulator_example.cpp | 53 ++++++++--
   sandbox/chrono/libs/chrono/example/scoped_stopwatch_example.cpp | 3
   sandbox/chrono/libs/chrono/example/specific_stopwatch_accumulator_example.cpp | 3
   sandbox/chrono/libs/chrono/test/Jamfile.v2 | 10 +-
   15 files changed, 408 insertions(+), 40 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-22 13:37:35 EST (Fri, 22 Jan 2010)
@@ -681,8 +681,10 @@
 
 [section Tutorial]
 
-
 [section thread clock]
+[endsect]
+
+[section How to define a thread clock]
 
     class thread_clock {
     public:
@@ -702,6 +704,139 @@
 
 [endsect]
 
+[section How can I prefix each report with `BOOST_CURRENT_FUNCTION` function signature?]
+
+You will need to give a specific format to you stopclock. You just need to concatenate the your specific patter to the default_format of the formatter.
+
+For example, for a stopclock_accumulator the default formatter is stopwatch_accumulator_formatter, this you will need to do something like:
+
+ static stopclock_accumulator<> acc(
+ std::string(BOOST_CURRENT_FUNCTION) + ": " + stopwatch_accumulator_formatter::default_format()
+ );
+ stopclock_accumulator<>::scoped_run _(acc);
+
+
+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
+
+ #define REPORT_FUNCTION_ACCUMULATED_LIFETIME\
+ static boost::chrono::stopclock_accumulator<> BOOST_JOIN(_boost_chrono_stopclock_accumulator_, __LINE__)( \
+ std::string(BOOST_CURRENT_FUNCTION) + ": " + boost::chrono::stopwatch_accumulator_formatter::default_format() \
+ ); \
+ boost::chrono::stopclock_accumulator<>::scoped_stop BOOST_JOIN(_boost_chrono_stopclock_accumulator_run_, __LINE__)(BOOST_JOIN(_boost_chrono_stopclock_accumulator_, __LINE__))
+
+
+With this macro you will just ave
+
+ void foo()
+ {
+ REPORT_FUNCTION_ACCUMULATED_LIFETIME() ;
+ boost::this_thread::sleep(boost::posix_time::milliseconds(100));
+ // ...
+ }
+
+[endsect]
+
+[section How can I prefix each report with `__FILE__[__LINE__]` pattern?]
+
+When you want to prefixx with the `__FILE__[__LINE__]` pattern you can follow the same technique as described below:
+
+ #define REPORT_LINE_ACCUMULATED_LIFETIME \
+ static stopclock_accumulator<> BOOST_JOIN(_boost_chrono_stopclock_accumulator_, __LINE__)( \
+ std::string(__FILE__) + "[" + BOOST_STRINGIZE(__LINE__) + "] " + stopwatch_accumulator_formatter::default_format() \
+ ); \
+ stopclock_accumulator<>::scoped_run BOOST_JOIN(_boost_chrono_stopclock_accumulator_run_, __LINE__) (BOOST_JOIN(_boost_chrono_stopclock_accumulator_, __LINE__))
+
+Now you can mix fcntion and line reports as follows
+
+ void foo()
+ {
+ REPORT_FUNCTION_ACCUMULATED_LIFETIME;
+ boost::this_thread::sleep(boost::posix_time::milliseconds(100));
+ {
+ REPORT_LINE_ACCUMULATED_LIFETIME;
+ boost::this_thread::sleep(boost::posix_time::milliseconds(200));
+ }
+
+ }
+
+[endsect]
+[section Can I use an stopclock accumulator which is not static?]
+
+The typical example of stopclock_accumulator is to get statistical measures of the time a function takes for each one of its calls. You an also use stopclock_accumulator to get statistical measures of the time a given loop takes for each one of its laps.
+
+ stopclock_accumulator<> acc(
+ std::string(__FILE__) + "[" + BOOST_STRINGIZE(__LINE__) + "] " + stopwatch_accumulator_formatter::default_format()
+ );
+ for (int i=0; i<N; i++) {
+ stopclock_accumulator<>::scoped_run _(acc);
+ // ...
+ }
+
+
+[endsect]
+
+[section How can I suspend a stopwatch?]
+
+ #include <boost/chrono/stopwatch.hpp>
+ #include <cmath>
+ #include <boost/thread.hpp>
+
+
+ using namespace boost::chrono;
+ double res;
+ void f1(long j)
+ {
+ stopwatch<>::reporter _(BOOST_CHRONO_STOPWATCH_FUNCTION_FORMAT);
+ for (long i =0; i< j; i+=1)
+ res+=std::sqrt( res+123.456L+i ); // burn some time
+ stopwatch<>::reporter::scoped_suspend s(_);
+ boost::this_thread::sleep(boost::posix_time::milliseconds(200));
+ }
+
+[endsect]
+
+[section How get specific statistics from stopwatches accumulator]
+
+ #include <boost/chrono/stopwatches.hpp>
+ #include <cmath>
+
+ using namespace boost::chrono;
+ using namespace boost::accumulators;
+ typedef stopwatch_accumulator<process_real_cpu_clock, kind::running,
+ accumulator_set<process_real_cpu_clock::rep,
+ features<
+ tag::count,
+ tag::sum,
+ tag::mean
+ >
+ >
+ >::reporter my_stopwatch_accumulator_reporter;
+
+ int f1(long j)
+ {
+ static my_stopwatch_accumulator_reporter acc(BOOST_CHRONO_ACCUMULATOR_FUNCTION_FORMAT);
+ my_stopwatch_accumulator_reporter::scoped_run _(acc);
+
+ for ( long i = 0; i < j; ++i )
+ std::sqrt( 123.456L ); // burn some time
+
+ return 0;
+ }
+ int main()
+ {
+
+ f1(100000);
+ f1(200000);
+ f1(300000);
+ return 0;
+ }
+
+[endsect]
+
+[section How can I make a specific formatter when the defaul do not satisfy my expectations]
+
+[endsect]
+
 [endsect]
 
 [/================================]

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-22 13:37:35 EST (Fri, 22 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="id4914656"></a>
+<a name="id4917271"></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&lt;&gt; 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="id4915066"></a>
+<a name="id4917681"></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="id4915107"></a>
+<a name="id4917722"></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-22 13:37:35 EST (Fri, 22 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="id4913440"></a>
+<a name="id4916055"></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="id4913529"></a>
+<a name="id4916144"></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="id4914110"></a>
+<a name="id4916725"></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&lt;1,3&gt; and the compilation succeeds.
       </p>
 <a name="boost_chrono.appendices.rationale.why_ratio_needs_the_nested_normalizer_typedef_type"></a><h4>
-<a name="id4914423"></a>
+<a name="id4917038"></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-22 13:37:35 EST (Fri, 22 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="id4917636"></a>
+<a name="id4920251"></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="id4918240"></a>
+<a name="id4920855"></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/cpp0x.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/cpp0x.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/cpp0x.html 2010-01-22 13:37:35 EST (Fri, 22 Jan 2010)
@@ -605,7 +605,7 @@
             and both of these calls happen before <code class="computeroutput"><span class="identifier">C1</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">::</span><span class="identifier">max</span><span class="special">()</span></code>.
           </p>
 <div class="table">
-<a name="id4831526"></a><p class="title"><b>Table 1. Clock Requirements</b></p>
+<a name="id4834136"></a><p class="title"><b>Table 1. Clock Requirements</b></p>
 <table class="table" summary="Clock Requirements">
 <colgroup>
 <col>

Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/other_clocks.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/other_clocks.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/other_clocks.html 2010-01-22 13:37:35 EST (Fri, 22 Jan 2010)
@@ -304,7 +304,7 @@
           <code class="computeroutput"><span class="identifier">clock</span></code> types.
         </p>
 <div class="table">
-<a name="id4854063"></a><p class="title"><b>Table 2. SuspendibleClock Requirements</b></p>
+<a name="id4856674"></a><p class="title"><b>Table 2. SuspendibleClock Requirements</b></p>
 <table class="table" summary="SuspendibleClock Requirements">
 <colgroup>
 <col>

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-22 13:37:35 EST (Fri, 22 Jan 2010)
@@ -78,7 +78,7 @@
           <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="id4865840"></a><p class="title"><b>Table 4. Stopwatch Requirements</b></p>
+<a name="id4868453"></a><p class="title"><b>Table 4. Stopwatch Requirements</b></p>
 <table class="table" summary="Stopwatch Requirements">
 <colgroup>
 <col>

Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/stopwatches.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/stopwatches.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/stopwatches.html 2010-01-22 13:37:35 EST (Fri, 22 Jan 2010)
@@ -135,7 +135,7 @@
           is an instance of <code class="computeroutput"><span class="identifier">S</span></code>.
         </p>
 <div class="table">
-<a name="id4857588"></a><p class="title"><b>Table 3. Stopwatch Requirements</b></p>
+<a name="id4860199"></a><p class="title"><b>Table 3. Stopwatch Requirements</b></p>
 <table class="table" summary="Stopwatch Requirements">
 <colgroup>
 <col>

Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide.html 2010-01-22 13:37:35 EST (Fri, 22 Jan 2010)
@@ -35,8 +35,25 @@
         World! </a></span></dt>
 </dl></dd>
 <dt><span class="section">Tutorial</span></dt>
-<dd><dl><dt><span class="section"><a href="users_guide/tutorial.html#boost_chrono.users_guide.tutorial.thread_clock">thread
- clock</a></span></dt></dl></dd>
+<dd><dl>
+<dt><span class="section"><a href="users_guide/tutorial.html#boost_chrono.users_guide.tutorial.thread_clock">thread
+ clock</a></span></dt>
+<dt><span class="section"><a href="users_guide/tutorial.html#boost_chrono.users_guide.tutorial.how_to_define_a_thread_clock">How
+ to define a thread clock</a></span></dt>
+<dt><span class="section"><a href="users_guide/tutorial.html#boost_chrono.users_guide.tutorial.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></span></dt>
+<dt><span class="section"><a href="users_guide/tutorial.html#boost_chrono.users_guide.tutorial.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></span></dt>
+<dt><span class="section"><a href="users_guide/tutorial.html#boost_chrono.users_guide.tutorial.can_i_use_an_stopclock_accumulator_which_is_not_static_">Can
+ I use an stopclock accumulator which is not static?</a></span></dt>
+<dt><span class="section"><a href="users_guide/tutorial.html#boost_chrono.users_guide.tutorial.how_can_i_suspend_a_stopwatch_">How
+ can I suspend a stopwatch?</a></span></dt>
+<dt><span class="section"><a href="users_guide/tutorial.html#boost_chrono.users_guide.tutorial.how_get_specific_statistics_from_stopwatches_accumulator">How
+ get specific statistics from stopwatches accumulator</a></span></dt>
+<dt><span class="section"><a href="users_guide/tutorial.html#boost_chrono.users_guide.tutorial.how_can_i_make_a_specific_formatter_when_the_defaul_do_not_satisfy_my_expectations">How
+ can I make a specific formatter when the defaul do not satisfy my expectations</a></span></dt>
+</dl></dd>
 <dt><span class="section"> References</span></dt>
 </dl></div>
 </div>

Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide/tutorial.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide/tutorial.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide/tutorial.html 2010-01-22 13:37:35 EST (Fri, 22 Jan 2010)
@@ -26,13 +26,35 @@
 <div class="titlepage"><div><div><h3 class="title">
 <a name="boost_chrono.users_guide.tutorial"></a>Tutorial
 </h3></div></div></div>
-<div class="toc"><dl><dt><span class="section"><a href="tutorial.html#boost_chrono.users_guide.tutorial.thread_clock">thread
- clock</a></span></dt></dl></div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h4 class="title">
+<div class="toc"><dl>
+<dt><span class="section"><a href="tutorial.html#boost_chrono.users_guide.tutorial.thread_clock">thread
+ clock</a></span></dt>
+<dt><span class="section"><a href="tutorial.html#boost_chrono.users_guide.tutorial.how_to_define_a_thread_clock">How
+ to define a thread clock</a></span></dt>
+<dt><span class="section"><a href="tutorial.html#boost_chrono.users_guide.tutorial.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></span></dt>
+<dt><span class="section"><a href="tutorial.html#boost_chrono.users_guide.tutorial.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></span></dt>
+<dt><span class="section"><a href="tutorial.html#boost_chrono.users_guide.tutorial.can_i_use_an_stopclock_accumulator_which_is_not_static_">Can
+ I use an stopclock accumulator which is not static?</a></span></dt>
+<dt><span class="section"><a href="tutorial.html#boost_chrono.users_guide.tutorial.how_can_i_suspend_a_stopwatch_">How
+ can I suspend a stopwatch?</a></span></dt>
+<dt><span class="section"><a href="tutorial.html#boost_chrono.users_guide.tutorial.how_get_specific_statistics_from_stopwatches_accumulator">How
+ get specific statistics from stopwatches accumulator</a></span></dt>
+<dt><span class="section"><a href="tutorial.html#boost_chrono.users_guide.tutorial.how_can_i_make_a_specific_formatter_when_the_defaul_do_not_satisfy_my_expectations">How
+ can I make a specific formatter when the defaul do not satisfy my expectations</a></span></dt>
+</dl></div>
+<div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title">
 <a name="boost_chrono.users_guide.tutorial.thread_clock"></a><a href="tutorial.html#boost_chrono.users_guide.tutorial.thread_clock" title="thread
         clock">thread
         clock</a>
+</h4></div></div></div></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono.users_guide.tutorial.how_to_define_a_thread_clock"></a><a href="tutorial.html#boost_chrono.users_guide.tutorial.how_to_define_a_thread_clock" title="How
+ to define a thread clock">How
+ to define a thread clock</a>
 </h4></div></div></div>
 <pre class="programlisting"><span class="keyword">class</span> <span class="identifier">thread_clock</span> <span class="special">{</span>
 <span class="keyword">public</span><span class="special">:</span>
@@ -51,6 +73,169 @@
 <span class="special">};</span>
 </pre>
 </div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono.users_guide.tutorial.how_can_i_prefix_each_report_with__boost_current_function__function_signature_"></a><a href="tutorial.html#boost_chrono.users_guide.tutorial.how_can_i_prefix_each_report_with__boost_current_function__function_signature_" 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>
+</h4></div></div></div>
+<p>
+ You will need to give a specific format to you stopclock. You just need
+ to concatenate the your specific patter to the default_format of the formatter.
+ </p>
+<p>
+ For example, for a stopclock_accumulator the default formatter is stopwatch_accumulator_formatter,
+ this you will need to do something like:
+ </p>
+<pre class="programlisting"><span class="keyword">static</span> <span class="identifier">stopclock_accumulator</span><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> <span class="identifier">stopwatch_accumulator_formatter</span><span class="special">::</span><span class="identifier">default_format</span><span class="special">()</span>
+<span class="special">);</span>
+<span class="identifier">stopclock_accumulator</span><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><span class="identifier">stopclock_accumulator</span><span class="special">&lt;&gt;</span> <span class="identifier">BOOST_JOIN</span><span class="special">(</span><span class="identifier">_boost_chrono_stopclock_accumulator_</span><span class="special">,</span> <span class="identifier">__LINE__</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">BOOST_CURRENT_FUNCTION</span><span class="special">)</span> <span class="special">+</span> <span class="string">": "</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">stopwatch_accumulator_formatter</span><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><span class="identifier">stopclock_accumulator</span><span class="special">&lt;&gt;::</span><span class="identifier">scoped_stop</span> <span class="identifier">BOOST_JOIN</span><span class="special">(</span><span class="identifier">_boost_chrono_stopclock_accumulator_run_</span><span class="special">,</span> <span class="identifier">__LINE__</span><span class="special">)(</span><span class="identifier">BOOST_JOIN</span><span class="special">(</span><span class="identifier">_boost_chrono_stopclock_accumulator_</span><span class="special">,</span> <span class="identifier">__LINE__</span><span class="special">))</span>
+</pre>
+<p>
+ With this macro you will just ave
+ </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" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono.users_guide.tutorial.how_can_i_prefix_each_report_with____file_____line_____pattern_"></a><a href="tutorial.html#boost_chrono.users_guide.tutorial.how_can_i_prefix_each_report_with____file_____line_____pattern_" 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>
+</h4></div></div></div>
+<p>
+ When you want to prefixx 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> <span class="identifier">stopclock_accumulator</span><span class="special">&lt;&gt;</span> <span class="identifier">BOOST_JOIN</span><span class="special">(</span><span class="identifier">_boost_chrono_stopclock_accumulator_</span><span class="special">,</span> <span class="identifier">__LINE__</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> <span class="identifier">stopwatch_accumulator_formatter</span><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">stopclock_accumulator</span><span class="special">&lt;&gt;::</span><span class="identifier">scoped_run</span> <span class="identifier">BOOST_JOIN</span><span class="special">(</span><span class="identifier">_boost_chrono_stopclock_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">_boost_chrono_stopclock_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" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono.users_guide.tutorial.can_i_use_an_stopclock_accumulator_which_is_not_static_"></a><a href="tutorial.html#boost_chrono.users_guide.tutorial.can_i_use_an_stopclock_accumulator_which_is_not_static_" title="Can
+ I use an stopclock accumulator which is not static?">Can
+ I use an stopclock accumulator which is not static?</a>
+</h4></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 an also use
+ stopclock_accumulator to get statistical measures of the time a given loop
+ takes for each one of its laps.
+ </p>
+<pre class="programlisting"><span class="identifier">stopclock_accumulator</span><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> <span class="identifier">stopwatch_accumulator_formatter</span><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>
+ <span class="identifier">stopclock_accumulator</span><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" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono.users_guide.tutorial.how_can_i_suspend_a_stopwatch_"></a><a href="tutorial.html#boost_chrono.users_guide.tutorial.how_can_i_suspend_a_stopwatch_" title="How
+ can I suspend a stopwatch?">How
+ can I suspend a stopwatch?</a>
+</h4></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">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>
+ <span class="identifier">stopwatch</span><span class="special">&lt;&gt;::</span><span class="identifier">reporter</span> <span class="identifier">_</span><span class="special">(</span><span class="identifier">BOOST_CHRONO_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> <span class="identifier">stopwatch</span><span class="special">&lt;&gt;::</span><span class="identifier">reporter</span><span class="special">::</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" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono.users_guide.tutorial.how_get_specific_statistics_from_stopwatches_accumulator"></a><a href="tutorial.html#boost_chrono.users_guide.tutorial.how_get_specific_statistics_from_stopwatches_accumulator" title="How
+ get specific statistics from stopwatches accumulator">How
+ get specific statistics from stopwatches accumulator</a>
+</h4></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">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">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">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> <span class="identifier">stopwatch_accumulator</span><span class="special">&lt;</span><span class="identifier">process_real_cpu_clock</span><span class="special">,</span> <span class="identifier">kind</span><span class="special">::</span><span class="identifier">running</span><span class="special">,</span>
+ <span class="identifier">accumulator_set</span><span class="special">&lt;</span><span class="identifier">process_real_cpu_clock</span><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">reporter</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="identifier">BOOST_CHRONO_ACCUMULATOR_FUNCTION_FORMAT</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>
+<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>
+</div>
+<div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono.users_guide.tutorial.how_can_i_make_a_specific_formatter_when_the_defaul_do_not_satisfy_my_expectations"></a><a href="tutorial.html#boost_chrono.users_guide.tutorial.how_can_i_make_a_specific_formatter_when_the_defaul_do_not_satisfy_my_expectations" title="How
+ can I make a specific formatter when the defaul do not satisfy my expectations">How
+ can I make a specific formatter when the defaul do not satisfy my expectations</a>
+</h4></div></div></div></div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
 <td align="left"></td>

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-22 13:37:35 EST (Fri, 22 Jan 2010)
@@ -120,7 +120,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 22, 2010 at 09:27:56 GMT</small></p></td>
+<td align="left"><p><small>Last revised: January 22, 2010 at 13:09:37 GMT</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr></table>
 <hr>

Modified: sandbox/chrono/libs/chrono/example/nested_stopclock_accumulator_example.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/example/nested_stopclock_accumulator_example.cpp (original)
+++ sandbox/chrono/libs/chrono/example/nested_stopclock_accumulator_example.cpp 2010-01-22 13:37:35 EST (Fri, 22 Jan 2010)
@@ -12,25 +12,58 @@
 #include <boost/thread.hpp>
 
 using namespace boost::chrono;
+
+#define BOOST_CHRONO_STOPCLOCK_ACCUMULATOR \
+ static stopclock_accumulator<> BOOST_JOIN(_boost_chrono_stopclock_accumulator_, __LINE__)( \
+ std::string(__FILE__) + "[" + BOOST_STRINGIZE(__LINE__) + "] " + stopwatch_accumulator_formatter::default_format() \
+ ); \
+ stopclock_accumulator<>::scoped_run BOOST_JOIN(_boost_chrono_stopclock_accumulator_run_, __LINE__)(BOOST_JOIN(_boost_chrono_stopclock_accumulator_, __LINE__))
+
+#define BOOST_CHRONO_STOPCLOCK_ACCUMULATOR_FCT \
+ static stopclock_accumulator<> BOOST_JOIN(_boost_chrono_stopclock_accumulator_, __LINE__)( \
+ std::string(BOOST_CURRENT_FUNCTION) + ": " + stopwatch_accumulator_formatter::default_format() \
+ ); \
+ stopclock_accumulator<>::scoped_stop BOOST_JOIN(_boost_chrono_stopclock_accumulator_run_, __LINE__)(BOOST_JOIN(_boost_chrono_stopclock_accumulator_, __LINE__))
+
+#define BOOST_CHRONO_STOPCLOCK_ACCUMULATOR_FCT_REVERSE \
+ static stopclock_accumulator<> BOOST_JOIN(_boost_chrono_stopclock_accumulator_, __LINE__)( \
+ std::string(BOOST_CURRENT_FUNCTION) + "(between calls): " + stopwatch_accumulator_formatter::default_format() \
+ ); \
+ stopclock_accumulator<>::scoped_stop BOOST_JOIN(_boost_chrono_stopclock_accumulator_stop_, __LINE__)(BOOST_JOIN(_boost_chrono_stopclock_accumulator_, __LINE__))
+
 void f1()
 {
- static stopclock_accumulator<> acc(stopwatch_accumulator_formatter::format(BOOST_STRINGIZE(__LINE__)));
- stopclock_accumulator<>::scoped_run _(acc);
+ //~ static stopclock_accumulator<> acc(
+ //~ std::string(__FILE__) + "[" + BOOST_STRINGIZE(__LINE__) + "] " + stopwatch_accumulator_formatter::default_format()
+ //~ );
+ //~ stopclock_accumulator<>::scoped_run _(acc);
+ BOOST_CHRONO_STOPCLOCK_ACCUMULATOR_FCT;
+ //BOOST_CHRONO_STOPCLOCK_ACCUMULATOR_FCT_REVERSE;
     boost::this_thread::sleep(boost::posix_time::milliseconds(100));
     {
- static stopclock_accumulator<> acc(stopwatch_accumulator_formatter::format(BOOST_STRINGIZE(__LINE__)));
- stopclock_accumulator<>::scoped_run _(acc);
+ BOOST_CHRONO_STOPCLOCK_ACCUMULATOR;
+ //~ static stopclock_accumulator<> acc(
+ //~ std::string(__FILE__) + "[" + BOOST_STRINGIZE(__LINE__) + "] " + stopwatch_accumulator_formatter::default_format()
+ //~ );
+ //~ stopclock_accumulator<>::scoped_run _(acc);
         boost::this_thread::sleep(boost::posix_time::milliseconds(200));
     }
 
 }
 int main()
 {
- static stopclock_accumulator<> acc(stopwatch_accumulator_formatter::format(BOOST_STRINGIZE(__LINE__)));
- stopclock_accumulator<>::scoped_run _(acc);
+ BOOST_CHRONO_STOPCLOCK_ACCUMULATOR_FCT;
+ //~ static stopclock_accumulator<> acc(
+ //~ std::string(__FILE__) + "[" + BOOST_STRINGIZE(__LINE__) + "] " + stopwatch_accumulator_formatter::default_format()
+ //~ );
+ //~ stopclock_accumulator<>::scoped_run _(acc);
 
- f1();
- f1();
- f1();
- return 0;
+ boost::this_thread::sleep(boost::posix_time::milliseconds(10));
+ f1();
+ boost::this_thread::sleep(boost::posix_time::milliseconds(100));
+ f1();
+ boost::this_thread::sleep(boost::posix_time::milliseconds(50));
+ f1();
+ boost::this_thread::sleep(boost::posix_time::milliseconds(200));
+ return 0;
 }

Modified: sandbox/chrono/libs/chrono/example/scoped_stopwatch_example.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/example/scoped_stopwatch_example.cpp (original)
+++ sandbox/chrono/libs/chrono/example/scoped_stopwatch_example.cpp 2010-01-22 13:37:35 EST (Fri, 22 Jan 2010)
@@ -1,6 +1,6 @@
 // stopwatch_example.cpp ---------------------------------------------------//
 
-// Copyright Beman Dawes 2006, 2008
+// Copyright 2009 Vicente J. Botet Escriba
 
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
@@ -10,7 +10,6 @@
 #include <boost/chrono/stopwatch.hpp>
 #include <cmath>
 #include <boost/thread.hpp>
-#include <boost/chrono/process_cpu_clocks.hpp>
 
 using namespace boost::chrono;
 double res;

Modified: sandbox/chrono/libs/chrono/example/specific_stopwatch_accumulator_example.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/example/specific_stopwatch_accumulator_example.cpp (original)
+++ sandbox/chrono/libs/chrono/example/specific_stopwatch_accumulator_example.cpp 2010-01-22 13:37:35 EST (Fri, 22 Jan 2010)
@@ -10,10 +10,9 @@
 #include <boost/chrono/stopwatches.hpp>
 #include <cmath>
 
-
 using namespace boost::chrono;
 using namespace boost::accumulators;
-typedef stopwatch_accumulator<process_real_cpu_clock,
+typedef stopwatch_accumulator<process_real_cpu_clock, kind::running,
             accumulator_set<process_real_cpu_clock::rep,
                 features<
                         tag::count,

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-22 13:37:35 EST (Fri, 22 Jan 2010)
@@ -88,11 +88,11 @@
         [ run run_timer_test.cpp : : : <library>/boost/system//boost_system : run_timer_test_dll ]
         ;
 
- test-suite "other_clocks"
- :
- [ run test_suspendible_clock.cpp : : : <library>/boost/thread//boost_thread <link>static ]
- [ run test_suspendible_clock.cpp : : : <library>/boost/thread//boost_thread <library>/boost/system//boost_system : test_suspendible_clock_dll ]
- ;
+ #test-suite "other_clocks"
+ # :
+ # [ run test_suspendible_clock.cpp : : : <library>/boost/thread//boost_thread <link>static ]
+ # [ run test_suspendible_clock.cpp : : : <library>/boost/thread//boost_thread <library>/boost/system//boost_system : test_suspendible_clock_dll ]
+ # ;
 
     test-suite "stopwatch"
         :


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