|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r65246 - in sandbox/chrono/libs/chrono/doc: . html html/boost_chrono html/boost_chrono/appendices html/boost_chrono/overview html/boost_chrono/reference html/boost_chrono/users_guide
From: vicente.botet_at_[hidden]
Date: 2010-09-04 08:58:53
Author: viboes
Date: 2010-09-04 08:58:51 EDT (Sat, 04 Sep 2010)
New Revision: 65246
URL: http://svn.boost.org/trac/boost/changeset/65246
Log:
cleanup
Text files modified:
sandbox/chrono/libs/chrono/doc/chrono.qbk | 111 ++++++++++++++-------------------------
sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/faq.html | 12 ++--
sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/history.html | 14 ++--
sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/perf.html | 4
sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/rationale.html | 80 +---------------------------
sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/todo.html | 4
sandbox/chrono/libs/chrono/doc/html/boost_chrono/overview.html | 2
sandbox/chrono/libs/chrono/doc/html/boost_chrono/overview/description.html | 11 ++-
sandbox/chrono/libs/chrono/doc/html/boost_chrono/overview/motivation.html | 21 ------
sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/cpp0x.html | 12 ++-
sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/other_clocks.html | 36 ++++++++----
sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide/examples.html | 3
sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide/getting_started.html | 69 ++++++++++--------------
sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide/tutorial.html | 42 +++++++++-----
sandbox/chrono/libs/chrono/doc/html/index.html | 2
15 files changed, 160 insertions(+), 263 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-09-04 08:58:51 EDT (Sat, 04 Sep 2010)
@@ -15,7 +15,6 @@
[copyright 2008 Howard Hinnant]
[copyright 2006, 2008 Beman Dawes]
[copyright 2009-2010 Vicente J. Botet Escriba]
- [purpose Time utilities]
[license
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
@@ -164,6 +163,21 @@
[def __SuspendibleClock__ [SuspendibleClock_concept_link `SuspendibleClock`]]
+[def __process_real_cpu_clock__ [link boost_chrono.reference.other_clocks.process_cpu_clocks_hpp.process_real_cpu_clock `process_real_cpu_clock`]]
+
+[def __process_system_cpu_clock__ [link boost_chrono.reference.other_clocks.process_cpu_clocks_hpp.process_system_cpu_clock `process_system_cpu_clock`]]
+
+[def __process_user_cpu_clock__ [link boost_chrono.reference.other_clocks.process_cpu_clocks_hpp.process_user_cpu_clock `process_user_cpu_clock`]]
+
+[def __thread_clock__ [link boost_chrono.reference.other_clocks.thread_clock_hpp.thread_clock `thread_clock`]]
+[def __suspendible_clock__ [link boost_chrono.reference.other_clocks.suspendible_clock_hpp.suspendible_clock `suspendible_clock`]]
+
+
+[template thread_clock_link[link_text] [link boost_chrono.reference.other_clocks.thread_clock_hpp.thread_clock [link_text]]]
+[def __thread_clock__ [thread_clock_link `thread_clock`]]
+
+
+
[warning Chrono is not part of the Boost libraries.]
[/===============]
@@ -229,9 +243,9 @@
[/
3 concrete process clocks:
-# __process_real_CPU_clock__,
-# __process_user_CPU_clock__,
-# __process_system_CPU_clock__
+# __process_real_cpu_clock__,
+# __process_user_cpu_clock__,
+# __process_system_cpu_clock__
providing a
]
@@ -244,10 +258,6 @@
]
-[heading How reliable are these measures?]
-
-There are a number of things that can lead to unreliable measurement (see [link boost_chrono.appendices.rationale here] for more details), but they mostly amount to reporting overhead. Boost.Chrono provides two ways to improve reliability of time measurements. A __stopwatch_accumulator__ only reports statistics once all measurements have been acquired, which removes reporting overhead from the measurements. The other approach is to use a __SuspendibleClock__ such that the reporting overhead can be ignored by suspending elapsed time tracking during reporting operations
-
[endsect]
[/==================]
@@ -356,13 +366,19 @@
[[@http://www.boost.org/libs/integer [*Boost.Integer]]] [for cstdint conformance, ...]
]
[
+ [[@http://www.boost.org/libs/mpl [*Boost.MPL]]] [for MPL Assert and bool, logical ...]
+]
+[
+ [[@http://www.boost.org/libs/operators [*Boost.Operators]]] [for operators, ...]
+]
+[
[[@http://www.boost.org/libs/system [*Boost.System]]] [for error_code, ...]
]
[
- [[@http://www.boost.org/libs/type_traits [*Boost.TypeTraits]]] [for is_base, ...]
+ [[@http://www.boost.org/libs/type_traits [*Boost.TypeTraits]]] [for is_base, is_convertible ...]
]
[
- [[@http://www.boost.org/libs/utility [*Boost.UtiliTy/EnableIf]]] [for enable_if, ...]
+ [[@http://www.boost.org/libs/utility [*Boost.Utility/EnableIf]]] [for enable_if, ...]
]
]
@@ -370,9 +386,6 @@
[variablelist
[
- [[@http://www.boost.org/libs/accumulator [*Boost.Accumulator]]] [for accumulator_set, and statistics features when stopwatch_accumulator.hpp is included]
-]
-[
[[@http://www.boost.org/libs/thread [*Boost.Thread]]] [for thread_specific_ptr when suspendible_clock.hpp is included]
]
[
@@ -443,36 +456,27 @@
[section Hello World! ]
[/====================]
-If all you want to do is to time a program's execution:
-
- #include <boost/chrono/stopclock.hpp>
-
- ...
+If all you want to do is to time a program's execution, here is a complete program (stopclock_example.cpp):
- // add this in the scope you want to time,
- // at the point you want the timer to start.
- boost::chrono::__stopclock__<> rt;
-
-Here is a complete program (stopclock_example.cpp):
-
- #include <boost/chrono/stopclock.hpp>
+ #include <boost/chrono.hpp>
#include <cmath>
int main()
{
- boost::chrono::__stopclock__<> t;
+ system_clock::time_point start = system_clock::now();
- for ( long i = 0; i < 10000000; ++i )
+ for ( long i = 0; i < 10000000; ++i )
std::sqrt( 123.456L ); // burn some time
- return 0;
+ __duration__<double> sec = system_clock::now() - start;
+ cout << "tooks " << sec.count() << " seconds\n";
+ return 0;
}
-Debug build output was:
+Output was:
- real 0.832s, cpu 0.813s (97.7%), user 0.813s, system 0.000s
+ tooks 0.832 seconds
-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.
[endsect]
@@ -577,9 +581,9 @@
A secondary benefit is that by publishing the class template __duration__ interface, user code can very easily create __duration_s__ with any precision they desire. The __ratio__ utility is used to specify the precision, so as long as the precision can be expressed by a rational constant with respect to seconds, this framework can exactly represent it (one third of a second is no problem, and neither is one third of a __femto second). All of this utility and flexibility comes at no cost just by making use of the no-run-time-overhead __ratio__ facility.
-In Boost.DateTime, __hours does not have the same representation as __nanoseconds__. The former is usually represented with a `long` whereas a `long long` is required for the latter. The reason for this is simply range. You don't need many hours to cover an extremely large range of time. But this isn't true of nanoseconds. Being able to reduce the sizeof overhead for some units when possible, can be a significant performance advantage.
+In Boost.DateTime, __hours__ does not have the same representation as __nanoseconds__. The former is usually represented with a `long` whereas a `long long` is required for the latter. The reason for this is simply range. You don't need many hours to cover an extremely large range of time. But this isn't true of nanoseconds. Being able to reduce the sizeof overhead for some units when possible, can be a significant performance advantage.
-__Boost_Chrono__ continues, and generalizes that philosophy. Not only can one specify the precision of a __duration__, one can also specify its representation. This can be any integral type, or even a floating point type. Or it can be a user-defined type which emulates an arithmetic type. The six predefined units all use signed integral types as their representation. And they all have a minimum range of +/- 292 years. __nanoseconds__ needs 64 bits to cover that range. __hours needs only 23 bits to cover that range.
+__Boost_Chrono__ continues, and generalizes that philosophy. Not only can one specify the precision of a __duration__, one can also specify its representation. This can be any integral type, or even a floating point type. Or it can be a user-defined type which emulates an arithmetic type. The six predefined units all use signed integral types as their representation. And they all have a minimum range of +/- 292 years. __nanoseconds__ needs 64 bits to cover that range. __hours__ needs only 23 bits to cover that range.
[section So What Exactly is a `duration` and How Do I Use One?]
@@ -826,7 +830,7 @@
ns d = end - start;
std::cout << ns.count() << "ns\n";
-If you need seconds with a floating point representation you can also eliminate the __duration_cast_`<>`:
+If you need seconds with a floating point representation you can also eliminate the __duration_cast__`<>`:
typedef boost::chrono::__duration__<double> sec; // seconds, stored with a double
sec d = end - start;
@@ -1187,7 +1191,7 @@
std::cout << "* testUser1 *\n";
std::cout << "*************\n";
User1::Distance d( User1::mile(110) );
- User1::Time t( boost::chrono::__hours(2) );
+ User1::Time t( boost::chrono::__hours__(2) );
RR r=d / t;
//r.set(d.get() / t.get());
@@ -4180,43 +4184,6 @@
__ratio__<3,9>::type r2;
r1 = r2; // compiles as both types are the same.
-
-[heading How reliable are these measures?]
-
-[/note this section need to be reworked, the ideas are there, but ...]
-
-
-There are three cases which can lead to get unreliable measures:
-
-* 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.
-
-
-``
-#include <boost/chrono/chrono.hpp>
- ...
- __stopclock__<__high_resolution_clock__> _;
-``
-
-* 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 __thread_clock__ which returns time elapsed for the calling thread only, if supported by the platform.
-
-* 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.
-
-* 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?
-
-
-Most of the stopclock overhead is likely due to logging. There are two things we can do to make the difference :
-
-* Don't flush log information while measuring elapsed time. A __stopwatch_accumulator__ 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.
-
-* Add a mechanism to track the difference between the application time and stopclock time. If a __Clock__ models __SuspendibleClock__ and its precision is sufficiently fine, this mechanism could suspend the __Clock_s__ counting while reporting measurements and resume it thereafter.
-
-[/
- stopclock<suspendible_clock<Clock> > _;
-
-
-See the performances section for more deep details.
-]
-
[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-09-04 08:58:51 EDT (Sat, 04 Sep 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___link_linkend__boost_chrono_reference_cpp0x_common_type_hpp_common_type___code__phrase_role__identifier__common_type__phrase___code___link__lt__gt__template_arguments_"></a><h4>
-<a name="id5083806"></a>
+<a name="id5083767"></a>
<a href="faq.html#boost_chrono.appendices.faq.how_important_is_the_order_of_the___link_linkend__boost_chrono_reference_cpp0x_common_type_hpp_common_type___code__phrase_role__identifier__common_type__phrase___code___link__lt__gt__template_arguments_">How
important is the order of the <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><> template arguments?</a>
@@ -70,7 +70,7 @@
also undefined.
</p>
<a name="boost_chrono.appendices.faq.why_does_stopwatch_reporter_only_display_millisecond_place_precision_when_the_underlying_clock_has_nanosecond_precision_"></a><h4>
-<a name="id5084360"></a>
+<a name="id5084321"></a>
<a href="faq.html#boost_chrono.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>
@@ -81,7 +81,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="id5084401"></a>
+<a name="id5084362"></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>
@@ -91,7 +91,7 @@
be reporting at times.
</p>
<a name="boost_chrono.appendices.faq.can_i_obtain_statistics_of_the_time_elapsed_between_calls_to_a_function_"></a><h4>
-<a name="id5084435"></a>
+<a name="id5084395"></a>
<a href="faq.html#boost_chrono.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>
</h4>
@@ -99,13 +99,13 @@
The library do not provides this feature.
</p>
<a name="boost_chrono.appendices.faq.what_happens_if_i_press_ctrl_c_and_program_terminates__what_log_would_boost_chrono_output_"></a><h4>
-<a name="id5084462"></a>
+<a name="id5084423"></a>
<a href="faq.html#boost_chrono.appendices.faq.what_happens_if_i_press_ctrl_c_and_program_terminates__what_log_would_boost_chrono_output_">What
happens if I press Ctrl+C and program terminates? What log would Boost.chrono
output?</a>
</h4>
<a name="boost_chrono.appendices.faq.can_you_explain_the_pros_cons_of___link_linkend__boost_chrono_reference_cpp0x_common_type_hpp_common_type___code__phrase_role__identifier__common_type__phrase___code___link__against_boost_typeof_"></a><h4>
-<a name="id5084492"></a>
+<a name="id5084452"></a>
<a href="faq.html#boost_chrono.appendices.faq.can_you_explain_the_pros_cons_of___link_linkend__boost_chrono_reference_cpp0x_common_type_hpp_common_type___code__phrase_role__identifier__common_type__phrase___code___link__against_boost_typeof_">Can
you explain the pros/cons of <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.common_type_hpp.common_type" title="
Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a> against Boost.Typeof?</a>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/history.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/history.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/history.html 2010-09-04 08:58:51 EDT (Sat, 04 Sep 2010)
@@ -131,12 +131,12 @@
Overview rewriting
</li>
<li>
- Added missing __thread<span class="underline">clock</span>_
- reference.
+ Added missing <a href="../reference/other_clocks.html#boost_chrono.reference.other_clocks.thread_clock_hpp.thread_clock" title="
+ Class thread_clock"><code class="computeroutput"><span class="identifier">thread_clock</span></code></a> reference.
</li>
<li>
- How to implement a __thread<span class="underline">clock</span>_
- tutorial removed.
+ How to implement a <a href="../reference/other_clocks.html#boost_chrono.reference.other_clocks.thread_clock_hpp.thread_clock" title="
+ Class thread_clock"><code class="computeroutput"><span class="identifier">thread_clock</span></code></a> tutorial removed.
</li>
<li>
References section renamed to External Resources.
@@ -224,7 +224,8 @@
</p>
<div class="itemizedlist"><ul type="disc">
<li>
- Added __thread<span class="underline">clock</span>_ implementation
+ Added <a href="../reference/other_clocks.html#boost_chrono.reference.other_clocks.thread_clock_hpp.thread_clock" title="
+ Class thread_clock"><code class="computeroutput"><span class="identifier">thread_clock</span></code></a> implementation
on Windows.
</li>
<li>
@@ -255,7 +256,8 @@
and nothing otherwise.
</li>
<li>
- __thread<span class="underline">clock</span>_ support on platforms
+ <a href="../reference/other_clocks.html#boost_chrono.reference.other_clocks.thread_clock_hpp.thread_clock" title="
+ Class thread_clock"><code class="computeroutput"><span class="identifier">thread_clock</span></code></a> support on platforms
providing it natively.
</li>
<li>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/perf.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/perf.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/perf.html 2010-09-04 08:58:51 EDT (Sat, 04 Sep 2010)
@@ -69,7 +69,7 @@
with a variable lifetime.
</p>
<a name="boost_chrono.appendices.perf.single_threaded_recursive_function"></a><h4>
-<a name="id5087576"></a>
+<a name="id5087537"></a>
<a href="perf.html#boost_chrono.appendices.perf.single_threaded_recursive_function">Single-Threaded
Recursive function</a>
</h4>
@@ -92,7 +92,7 @@
and thread_clock.
</p>
<a name="boost_chrono.appendices.perf.multi_threaded_recursive_function"></a><h4>
-<a name="id5087626"></a>
+<a name="id5087586"></a>
<a href="perf.html#boost_chrono.appendices.perf.multi_threaded_recursive_function">Multi-Threaded
Recursive function</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-09-04 08:58:51 EDT (Sat, 04 Sep 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___link_linkend__boost_chrono_reference_cpp0x_chrono_chrono_hpp_duration___code__phrase_role__identifier__duration__phrase___code___link__to_a_function_with_the_units_being_ambiguous_"></a><h4>
-<a name="id5082145"></a>
+<a name="id5082398"></a>
<a href="rationale.html#boost_chrono.appendices.rationale.is_it_possible_for_the_user_to_pass_a___link_linkend__boost_chrono_reference_cpp0x_chrono_chrono_hpp_duration___code__phrase_role__identifier__duration__phrase___code___link__to_a_function_with_the_units_being_ambiguous_">Is
it possible for the user to pass a <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a> to a function with the
@@ -46,7 +46,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="id5082245"></a>
+<a name="id5082497"></a>
<a href="rationale.html#boost_chrono.appendices.rationale.why_duration_needs_operator_">Why
duration needs operator%</a>
</h4>
@@ -74,7 +74,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="id5082825"></a>
+<a name="id5083078"></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>
@@ -109,7 +109,7 @@
succeeds.
</p>
<a name="boost_chrono.appendices.rationale.why_ratio_needs_the_nested_normalizer_typedef_type"></a><h4>
-<a name="id5083234"></a>
+<a name="id5083487"></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>
@@ -139,78 +139,6 @@
Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special"><</span><span class="number">3</span><span class="special">,</span><span class="number">9</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">r2</span><span class="special">;</span>
<span class="identifier">r1</span> <span class="special">=</span> <span class="identifier">r2</span><span class="special">;</span> <span class="comment">// compiles as both types are the same.
</span></pre>
-<a name="boost_chrono.appendices.rationale.how_reliable_are_these_measures_"></a><h4>
-<a name="id5083479"></a>
- <a href="rationale.html#boost_chrono.appendices.rationale.how_reliable_are_these_measures_">How
- reliable are these measures?</a>
- </h4>
-<p>
- There are three cases which can lead to get unreliable measures:
- </p>
-<div class="itemizedlist"><ul type="disc"><li>
- 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"><</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">></span>
- <span class="special">...</span>
- <span class="identifier">__stopclock__</span><span class="special"><</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.high_resolution_clock" title="
- Class high_resolution_clock"><code class="computeroutput"><span class="identifier">high_resolution_clock</span></code></a><span class="special">></span> <span class="identifier">_</span><span class="special">;</span>
-</pre>
-<p>
- </p>
-<div class="itemizedlist"><ul type="disc">
-<li>
- 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 __thread<span class="underline">clock</span>_ which returns time elapsed for the
- calling thread only, if supported by the platform.
- </li>
-<li>
- 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>
- 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 type="disc">
-<li>
- Don't flush log information while measuring elapsed time. A __stopwatch<span class="underline">accumulator</span>_ 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>
- Add a mechanism to track the difference between the application time
- and stopclock time. If a <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.clock" title="
- Clock Requirements"><code class="computeroutput"><span class="identifier">Clock</span></code></a> models <a href="../reference/other_clocks.html#boost_chrono.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 <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.clock" title="
- Clock Requirements"><code class="computeroutput"><span class="identifier">Clock</span></code>'s</a> counting while reporting
- measurements and resume it thereafter.
- </li>
-</ul></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/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-09-04 08:58:51 EDT (Sat, 04 Sep 2010)
@@ -26,7 +26,7 @@
<a name="boost_chrono.appendices.todo"></a> Appendix I: Future plans
</h3></div></div></div>
<a name="boost_chrono.appendices.todo.tasks_to_do_before_review"></a><h4>
-<a name="id5087692"></a>
+<a name="id5087652"></a>
<a href="todo.html#boost_chrono.appendices.todo.tasks_to_do_before_review">Tasks
to do before review</a>
</h4>
@@ -42,7 +42,7 @@
</li>
</ul></div>
<a name="boost_chrono.appendices.todo.for_later_releases"></a><h4>
-<a name="id5087741"></a>
+<a name="id5087702"></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/overview.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/overview.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/overview.html 2010-09-04 08:58:51 EDT (Sat, 04 Sep 2010)
@@ -38,7 +38,7 @@
<span class="bold"><strong><span class="emphasis"><em>-- Augustine </em></span></strong></span>
</p></blockquote></div>
<a name="boost_chrono.overview.how_to_use_this_documentation"></a><h3>
-<a name="id4948604"></a>
+<a name="id4948600"></a>
<a href="overview.html#boost_chrono.overview.how_to_use_this_documentation">How to
Use This Documentation</a>
</h3>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/overview/description.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/overview/description.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/overview/description.html 2010-09-04 08:58:51 EDT (Sat, 04 Sep 2010)
@@ -100,15 +100,18 @@
</p>
<div class="itemizedlist"><ul type="disc">
<li>
- __process_real_cpu<span class="underline">clock</span>_, captures
+ <a href="../reference/other_clocks.html#boost_chrono.reference.other_clocks.process_cpu_clocks_hpp.process_real_cpu_clock" title="
+ Class process_real_cpu_clock"><code class="computeroutput"><span class="identifier">process_real_cpu_clock</span></code></a>, captures
real (wall clock) CPU times.
</li>
<li>
- __process_user_cpu<span class="underline">clock</span>_, captures
+ <a href="../reference/other_clocks.html#boost_chrono.reference.other_clocks.process_cpu_clocks_hpp.process_user_cpu_clock" title="
+ Class process_user_cpu_clock"><code class="computeroutput"><span class="identifier">process_user_cpu_clock</span></code></a>, captures
user-CPU times.
</li>
<li>
- __process_system_cpu<span class="underline">clock</span>_, captures
+ <a href="../reference/other_clocks.html#boost_chrono.reference.other_clocks.process_cpu_clocks_hpp.process_system_cpu_clock" title="
+ Class process_system_cpu_clock"><code class="computeroutput"><span class="identifier">process_system_cpu_clock</span></code></a>, captures
system-CPU times.
</li>
<li>
@@ -127,7 +130,7 @@
auto with C++03 compilers.
</p>
<a name="boost_chrono.overview.description.caveat_emptor"></a><h4>
-<a name="id4949593"></a>
+<a name="id4949556"></a>
<a href="description.html#boost_chrono.overview.description.caveat_emptor">Caveat emptor</a>
</h4>
<p>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/overview/motivation.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/overview/motivation.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/overview/motivation.html 2010-09-04 08:58:51 EDT (Sat, 04 Sep 2010)
@@ -27,7 +27,7 @@
<a name="boost_chrono.overview.motivation"></a>Motivation
</h3></div></div></div>
<a name="boost_chrono.overview.motivation.time"></a><h4>
-<a name="id4948871"></a>
+<a name="id4948868"></a>
<a href="motivation.html#boost_chrono.overview.motivation.time">Time</a>
</h4>
<p>
@@ -46,7 +46,7 @@
of a good deal of information in this documentation.
</p>
<a name="boost_chrono.overview.motivation.wall_clock_versus_system_and_user_time"></a><h4>
-<a name="id4948928"></a>
+<a name="id4948925"></a>
<a href="motivation.html#boost_chrono.overview.motivation.wall_clock_versus_system_and_user_time">Wall
clock versus system and user time</a>
</h4>
@@ -57,23 +57,6 @@
clock) time, user CPU time, and system CPU time. (On POSIX-like systems,
this relies on times(). On Windows, it relies on GetProcessTimes().)
</p>
-<a name="boost_chrono.overview.motivation.how_reliable_are_these_measures_"></a><h4>
-<a name="id4948959"></a>
- <a href="motivation.html#boost_chrono.overview.motivation.how_reliable_are_these_measures_">How
- reliable are these measures?</a>
- </h4>
-<p>
- There are a number of things that can lead to unreliable measurement (see
- here for more details),
- but they mostly amount to reporting overhead. Boost.Chrono provides two ways
- to improve reliability of time measurements. A __stopwatch<span class="underline">accumulator</span>_
- only reports statistics once all measurements have been acquired, which removes
- reporting overhead from the measurements. The other approach is to use a
- <a href="../reference/other_clocks.html#boost_chrono.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>
<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/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-09-04 08:58:51 EDT (Sat, 04 Sep 2010)
@@ -1069,16 +1069,20 @@
Class high_resolution_clock"><code class="computeroutput"><span class="identifier">high_resolution_clock</span></code></a>
</li>
<li>
- __process_real_cpu<span class="underline">clock</span>_
+ <a href="other_clocks.html#boost_chrono.reference.other_clocks.process_cpu_clocks_hpp.process_real_cpu_clock" title="
+ Class process_real_cpu_clock"><code class="computeroutput"><span class="identifier">process_real_cpu_clock</span></code></a>
</li>
<li>
- __process_user_cpu<span class="underline">clock</span>_
+ <a href="other_clocks.html#boost_chrono.reference.other_clocks.process_cpu_clocks_hpp.process_user_cpu_clock" title="
+ Class process_user_cpu_clock"><code class="computeroutput"><span class="identifier">process_user_cpu_clock</span></code></a>
</li>
<li>
- __process_system_cpu<span class="underline">clock</span>_
+ <a href="other_clocks.html#boost_chrono.reference.other_clocks.process_cpu_clocks_hpp.process_system_cpu_clock" title="
+ Class process_system_cpu_clock"><code class="computeroutput"><span class="identifier">process_system_cpu_clock</span></code></a>
</li>
<li>
- __thread<span class="underline">clock</span>_
+ <a href="other_clocks.html#boost_chrono.reference.other_clocks.thread_clock_hpp.thread_clock" title="
+ Class thread_clock"><code class="computeroutput"><span class="identifier">thread_clock</span></code></a>
</li>
</ul></div>
</div>
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-09-04 08:58:51 EDT (Sat, 04 Sep 2010)
@@ -111,12 +111,14 @@
Class <code class="computeroutput"><span class="identifier">process_real_cpu_clock</span></code></a>
</h5></div></div></div>
<p>
- __process_real_cpu<span class="underline">clock</span>_ satisfy
+ <a href="other_clocks.html#boost_chrono.reference.other_clocks.process_cpu_clocks_hpp.process_real_cpu_clock" title="
+ Class process_real_cpu_clock"><code class="computeroutput"><span class="identifier">process_real_cpu_clock</span></code></a> satisfy
the <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.clock" title="
Clock Requirements"><code class="computeroutput"><span class="identifier">Clock</span></code> requirements</a>.
</p>
<p>
- __process_real_cpu<span class="underline">clock</span>_ class
+ <a href="other_clocks.html#boost_chrono.reference.other_clocks.process_cpu_clocks_hpp.process_real_cpu_clock" title="
+ Class process_real_cpu_clock"><code class="computeroutput"><span class="identifier">process_real_cpu_clock</span></code></a> class
provides access to the real process wall-clock monotonic clock, i.e.
the real CPU-time clock of the calling process. The process relative
current time can be obtained by calling <code class="computeroutput"><span class="identifier">process_real_cpu_clock</span><span class="special">::</span><span class="identifier">now</span><span class="special">()</span></code>.
@@ -140,12 +142,14 @@
Class <code class="computeroutput"><span class="identifier">process_user_cpu_clock</span></code></a>
</h5></div></div></div>
<p>
- __process_user_cpu<span class="underline">clock</span>_ satisfy
+ <a href="other_clocks.html#boost_chrono.reference.other_clocks.process_cpu_clocks_hpp.process_user_cpu_clock" title="
+ Class process_user_cpu_clock"><code class="computeroutput"><span class="identifier">process_user_cpu_clock</span></code></a> satisfy
the <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.clock" title="
Clock Requirements"><code class="computeroutput"><span class="identifier">Clock</span></code> requirements</a>.
</p>
<p>
- __process_user_cpu<span class="underline">clock</span>_ class
+ <a href="other_clocks.html#boost_chrono.reference.other_clocks.process_cpu_clocks_hpp.process_user_cpu_clock" title="
+ Class process_user_cpu_clock"><code class="computeroutput"><span class="identifier">process_user_cpu_clock</span></code></a> class
provides access to the user CPU-time monotonic clock of the calling process.
The process relative user current time can be obtained by calling <code class="computeroutput"><span class="identifier">process_user_cpu_clock</span><span class="special">::</span><span class="identifier">now</span><span class="special">()</span></code>.
</p>
@@ -168,12 +172,14 @@
Class <code class="computeroutput"><span class="identifier">process_system_cpu_clock</span></code></a>
</h5></div></div></div>
<p>
- __process_system_cpu<span class="underline">clock</span>_ satisfy
+ <a href="other_clocks.html#boost_chrono.reference.other_clocks.process_cpu_clocks_hpp.process_system_cpu_clock" title="
+ Class process_system_cpu_clock"><code class="computeroutput"><span class="identifier">process_system_cpu_clock</span></code></a> satisfy
the <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.clock" title="
Clock Requirements"><code class="computeroutput"><span class="identifier">Clock</span></code> requirements</a>.
</p>
<p>
- __process_system_cpu<span class="underline">clock</span>_ class
+ <a href="other_clocks.html#boost_chrono.reference.other_clocks.process_cpu_clocks_hpp.process_system_cpu_clock" title="
+ Class process_system_cpu_clock"><code class="computeroutput"><span class="identifier">process_system_cpu_clock</span></code></a> class
provides access to the system CPU-time monotonic clockof the calling
process. The process relative system current time can be obtained by
calling <code class="computeroutput"><span class="identifier">process_system_cpu_clock</span><span class="special">::</span><span class="identifier">now</span><span class="special">()</span></code>.
@@ -344,14 +350,16 @@
Class <code class="computeroutput"><span class="identifier">thread_clock</span></code></a>
</h5></div></div></div>
<p>
- __thread<span class="underline">clock</span>_ satisfy the <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.clock" title="
+ <a href="other_clocks.html#boost_chrono.reference.other_clocks.thread_clock_hpp.thread_clock" title="
+ Class thread_clock"><code class="computeroutput"><span class="identifier">thread_clock</span></code></a> satisfy the <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.clock" title="
Clock Requirements"><code class="computeroutput"><span class="identifier">Clock</span></code> requirements</a>.
</p>
<p>
- __thread<span class="underline">clock</span>_ class provides access
- to the real thread wall-clock, i.e. the real CPU-time clock of the calling
- thread. The thread relative current time can be obtained by calling
- <code class="computeroutput"><span class="identifier">thread_clock</span><span class="special">::</span><span class="identifier">now</span><span class="special">()</span></code>.
+ <a href="other_clocks.html#boost_chrono.reference.other_clocks.thread_clock_hpp.thread_clock" title="
+ Class thread_clock"><code class="computeroutput"><span class="identifier">thread_clock</span></code></a> class provides
+ access to the real thread wall-clock, i.e. the real CPU-time clock of
+ the calling thread. The thread relative current time can be obtained
+ by calling <code class="computeroutput"><span class="identifier">thread_clock</span><span class="special">::</span><span class="identifier">now</span><span class="special">()</span></code>.
</p>
<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>
@@ -531,7 +539,8 @@
Models of <code class="computeroutput"><span class="identifier">SuspendibleClock</span></code>:
</p>
<div class="itemizedlist"><ul type="disc"><li>
- __suspendible<span class="underline">clock</span>_]
+ <a href="other_clocks.html#boost_chrono.reference.other_clocks.suspendible_clock_hpp.suspendible_clock" title="
+ Template Class suspendible_clock<>"><code class="computeroutput"><span class="identifier">suspendible_clock</span></code></a>]
</li></ul></div>
</div>
<div class="section" lang="en">
@@ -611,7 +620,8 @@
<code class="computeroutput"><span class="identifier">suspendible_clock</span><span class="special"><></span></code></a></span></dt></dl></div>
<p>
Given a <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.clock" title="
- Clock Requirements"><code class="computeroutput"><span class="identifier">Clock</span></code></a>, __suspendible<span class="underline">clock</span>_ < <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.clock" title="
+ Clock Requirements"><code class="computeroutput"><span class="identifier">Clock</span></code></a>, <a href="other_clocks.html#boost_chrono.reference.other_clocks.suspendible_clock_hpp.suspendible_clock" title="
+ Template Class suspendible_clock<>"><code class="computeroutput"><span class="identifier">suspendible_clock</span></code></a> < <a href="cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.clock" title="
Clock Requirements"><code class="computeroutput"><span class="identifier">Clock</span></code></a>> is a model of <a href="other_clocks.html#boost_chrono.reference.other_clocks.suspendible_clock_req" title="
SuspendibleClock Requirements"><code class="computeroutput"><span class="identifier">SuspendibleClock</span></code></a>.
</p>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide/examples.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide/examples.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide/examples.html 2010-09-04 08:58:51 EDT (Sat, 04 Sep 2010)
@@ -355,7 +355,8 @@
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"* testUser1 *\n"</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"*************\n"</span><span class="special">;</span>
<span class="identifier">User1</span><span class="special">::</span><span class="identifier">Distance</span> <span class="identifier">d</span><span class="special">(</span> <span class="identifier">User1</span><span class="special">::</span><span class="identifier">mile</span><span class="special">(</span><span class="number">110</span><span class="special">)</span> <span class="special">);</span>
- <span class="identifier">User1</span><span class="special">::</span><span class="identifier">Time</span> <span class="identifier">t</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">__hours</span><span class="special">(</span><span class="number">2</span><span class="special">)</span> <span class="special">);</span>
+ <span class="identifier">User1</span><span class="special">::</span><span class="identifier">Time</span> <span class="identifier">t</span><span class="special">(</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ duration typedefs"><code class="computeroutput"><span class="identifier">hours</span></code></a><span class="special">(</span><span class="number">2</span><span class="special">)</span> <span class="special">);</span>
<span class="identifier">RR</span> <span class="identifier">r</span><span class="special">=</span><span class="identifier">d</span> <span class="special">/</span> <span class="identifier">t</span><span class="special">;</span>
<span class="comment">//r.set(d.get() / t.get());
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide/getting_started.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide/getting_started.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide/getting_started.html 2010-09-04 08:58:51 EDT (Sat, 04 Sep 2010)
@@ -39,7 +39,7 @@
Installing Chrono</a>
</h4></div></div></div>
<a name="boost_chrono.users_guide.getting_started.install.getting__emphasis_role__bold__boost_chrono__emphasis__"></a><h5>
-<a name="id4949670"></a>
+<a name="id4949634"></a>
<a href="getting_started.html#boost_chrono.users_guide.getting_started.install.getting__emphasis_role__bold__boost_chrono__emphasis__">Getting
<span class="bold"><strong>Boost.Chrono</strong></span> </a>
</h5>
@@ -54,7 +54,7 @@
and follow the instructions there for anonymous SVN access.
</p>
<a name="boost_chrono.users_guide.getting_started.install.where_to_install__emphasis_role__bold__boost_chrono__emphasis___"></a><h5>
-<a name="id4949742"></a>
+<a name="id4949705"></a>
<a href="getting_started.html#boost_chrono.users_guide.getting_started.install.where_to_install__emphasis_role__bold__boost_chrono__emphasis___">Where
to install <span class="bold"><strong>Boost.Chrono</strong></span>? </a>
</h5>
@@ -70,7 +70,7 @@
variable. Any help is welcome.
</p>
<a name="boost_chrono.users_guide.getting_started.install.building__emphasis_role__bold__boost_chrono__emphasis__"></a><h5>
-<a name="id4949784"></a>
+<a name="id4949760"></a>
<a href="getting_started.html#boost_chrono.users_guide.getting_started.install.building__emphasis_role__bold__boost_chrono__emphasis__">Building
<span class="bold"><strong>Boost.Chrono</strong></span> </a>
</h5>
@@ -81,7 +81,7 @@
<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">build</span>
</pre>
<a name="boost_chrono.users_guide.getting_started.install.requirements"></a><h5>
-<a name="id4949855"></a>
+<a name="id4949831"></a>
<a href="getting_started.html#boost_chrono.users_guide.getting_started.install.requirements">Requirements</a>
</h5>
<p>
@@ -107,15 +107,23 @@
<dd><p>
for cstdint conformance, ...
</p></dd>
+<dt><span class="term">Boost.MPL</span></dt>
+<dd><p>
+ for MPL Assert and bool, logical ...
+ </p></dd>
+<dt><span class="term">Boost.Operators</span></dt>
+<dd><p>
+ for operators, ...
+ </p></dd>
<dt><span class="term">Boost.System</span></dt>
<dd><p>
for error_code, ...
</p></dd>
<dt><span class="term">Boost.TypeTraits</span></dt>
<dd><p>
- for is_base, ...
+ for is_base, is_convertible ...
</p></dd>
-<dt><span class="term">Boost.UtiliTy/EnableIf</span></dt>
+<dt><span class="term">Boost.Utility/EnableIf</span></dt>
<dd><p>
for enable_if, ...
</p></dd>
@@ -127,11 +135,6 @@
<div class="variablelist">
<p class="title"><b></b></p>
<dl>
-<dt><span class="term">Boost.Accumulator</span></dt>
-<dd><p>
- for accumulator_set, and statistics features when stopwatch_accumulator.hpp
- is included
- </p></dd>
<dt><span class="term">Boost.Thread</span></dt>
<dd><p>
for thread_specific_ptr when suspendible_clock.hpp is included
@@ -144,7 +147,7 @@
</dl>
</div>
<a name="boost_chrono.users_guide.getting_started.install.building_an_executable_that_uses__emphasis_role__bold__boost_chrono__emphasis__"></a><h5>
-<a name="id4942310"></a>
+<a name="id4942300"></a>
<a href="getting_started.html#boost_chrono.users_guide.getting_started.install.building_an_executable_that_uses__emphasis_role__bold__boost_chrono__emphasis__">Building
an executable that uses <span class="bold"><strong>Boost.Chrono</strong></span>
</a>
@@ -155,7 +158,7 @@
need also with Boos Thread.
</p>
<a name="boost_chrono.users_guide.getting_started.install.exceptions_safety_"></a><h5>
-<a name="id4942346"></a>
+<a name="id4942336"></a>
<a href="getting_started.html#boost_chrono.users_guide.getting_started.install.exceptions_safety_">Exceptions
safety </a>
</h5>
@@ -164,7 +167,7 @@
of exception safety as long as the underlying parameters provide it.
</p>
<a name="boost_chrono.users_guide.getting_started.install.thread_safety_"></a><h5>
-<a name="id4942374"></a>
+<a name="id4942363"></a>
<a href="getting_started.html#boost_chrono.users_guide.getting_started.install.thread_safety_">Thread
safety </a>
</h5>
@@ -172,7 +175,7 @@
All functions in the library are thread-unsafe except when noted explicitly.
</p>
<a name="boost_chrono.users_guide.getting_started.install.tested_compilers_"></a><h5>
-<a name="id4942399"></a>
+<a name="id4942389"></a>
<a href="getting_started.html#boost_chrono.users_guide.getting_started.install.tested_compilers_">Tested
compilers </a>
</h5>
@@ -253,44 +256,30 @@
World! </a>
</h4></div></div></div>
<p>
- If all you want to do is to time a program's execution:
+ If all you want to do is to time a program's execution, here is a complete
+ program (stopclock_example.cpp):
</p>
-<pre class="programlisting"><span class="preprocessor">#include</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</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></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><span class="identifier">__stopclock__</span><span class="special"><></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"><</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>
+<pre class="programlisting"><span class="preprocessor">#include</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">hpp</span><span class="special">></span>
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">cmath</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">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">t</span><span class="special">;</span>
+ <span class="identifier">system_clock</span><span class="special">::</span><span class="identifier">time_point</span> <span class="identifier">start</span> <span class="special">=</span> <span class="identifier">system_clock</span><span class="special">::</span><span class="identifier">now</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"><</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="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"><</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>
+ <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
+ Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">double</span><span class="special">></span> <span class="identifier">sec</span> <span class="special">=</span> <span class="identifier">system_clock</span><span class="special">::</span><span class="identifier">now</span><span class="special">()</span> <span class="special">-</span> <span class="identifier">start</span><span class="special">;</span>
+ <span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"tooks "</span> <span class="special"><<</span> <span class="identifier">sec</span><span class="special">.</span><span class="identifier">count</span><span class="special">()</span> <span class="special"><<</span> <span class="string">" seconds\n"</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>
- Debug build output was:
+ 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 class="programlisting"><span class="identifier">tooks</span> <span class="number">0.832</span> <span class="identifier">seconds</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>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
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-09-04 08:58:51 EDT (Sat, 04 Sep 2010)
@@ -354,7 +354,9 @@
Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a> facility.
</p>
<p>
- In Boost.DateTime, __hours does not have the same representation as <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ In Boost.DateTime, <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ duration typedefs"><code class="computeroutput"><span class="identifier">hours</span></code></a> does not have the same representation
+ as <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">nanoseconds</span></code></a>. The former is usually
represented with a <code class="computeroutput"><span class="keyword">long</span></code> whereas
a <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">long</span></code>
@@ -372,7 +374,9 @@
The six predefined units all use signed integral types as their representation.
And they all have a minimum range of +/- 292 years. <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">nanoseconds</span></code></a> needs 64 bits to cover
- that range. __hours needs only 23 bits to cover that range.
+ that range. <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ duration typedefs"><code class="computeroutput"><span class="identifier">hours</span></code></a> needs only 23 bits to cover
+ that range.
</p>
<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
@@ -469,7 +473,7 @@
fractional part gets silently discarded.
</p>
<a name="boost_chrono.users_guide.tutorial.duration.what_happens_if_i_assign__m3___us3__to__minutes__instead_of__microseconds__.but_what_if_the_truncation_behavior_is_what_i_want_to_do_"></a><h6>
-<a name="id4998910"></a>
+<a name="id4998866"></a>
<a href="tutorial.html#boost_chrono.users_guide.tutorial.duration.what_happens_if_i_assign__m3___us3__to__minutes__instead_of__microseconds__.but_what_if_the_truncation_behavior_is_what_i_want_to_do_">But
what if the truncation behavior is what I want to do?</a>
</h6>
@@ -920,9 +924,10 @@
<p>
You can use <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_cast" title="
Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a><code class="computeroutput"><span class="special"><></span></code>
- to convert the __thread<span class="underline">clock</span>_<code class="computeroutput"><span class="special">::</span><span class="identifier">duration</span></code>
- into whatever units you desire. This facility will round down (truncate)
- if an exact conversion is not possible. Ex:
+ to convert the <a href="../reference/other_clocks.html#boost_chrono.reference.other_clocks.thread_clock_hpp.thread_clock" title="
+ Class thread_clock"><code class="computeroutput"><span class="identifier">thread_clock</span></code></a><code class="computeroutput"><span class="special">::</span><span class="identifier">duration</span></code> into whatever units you desire.
+ This facility will round down (truncate) if an exact conversion is not
+ possible. Ex:
</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> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">milliseconds</span></code></a> <span class="identifier">ms</span><span class="special">;</span>
@@ -934,7 +939,8 @@
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">ms</span><span class="special">.</span><span class="identifier">count</span><span class="special">()</span> <span class="special"><<</span> <span class="string">"ms\n"</span><span class="special">;</span>
</pre>
<p>
- As <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">__thread_clock__</span><span class="special">::</span><span class="identifier">duration</span></code> is <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
+ As <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><a href="../reference/other_clocks.html#boost_chrono.reference.other_clocks.thread_clock_hpp.thread_clock" title="
+ Class thread_clock"><code class="computeroutput"><span class="identifier">thread_clock</span></code></a><span class="special">::</span><span class="identifier">duration</span></code> is <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">nanoseconds</span></code></a>, we can convert
to <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_typedefs" title="
duration typedefs"><code class="computeroutput"><span class="identifier">nanoseconds</span></code></a>, or some integral-based
@@ -951,7 +957,8 @@
</pre>
<p>
If you need seconds with a floating point representation you can also
- eliminate the __duration<span class="underline">cast</span><code class="computeroutput"><span class="special"><></span></code>:
+ eliminate the <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_cast" title="
+ Non-Member function duration_cast(duration)"><code class="computeroutput"><span class="identifier">duration_cast</span></code></a><code class="computeroutput"><span class="special"><></span></code>:
</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> <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration" title="
Class template duration<>"><code class="computeroutput"><span class="identifier">duration</span></code></a><span class="special"><</span><span class="keyword">double</span><span class="special">></span> <span class="identifier">sec</span><span class="special">;</span> <span class="comment">// seconds, stored with a double
@@ -966,17 +973,20 @@
Else it will not compile.
</p>
<p>
- If you would like to programmatically inspect <code class="computeroutput"><span class="identifier">__thread_clock__</span><span class="special">::</span><span class="identifier">duration</span></code>,
- you can get the representation type with <code class="computeroutput"><span class="identifier">__thread_clock__</span><span class="special">::</span><span class="identifier">rep</span></code>,
- and the tick period with <code class="computeroutput"><span class="identifier">__thread_clock__</span><span class="special">::</span><span class="identifier">period</span></code>
- (which should be a type <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
+ If you would like to programmatically inspect <code class="computeroutput"><a href="../reference/other_clocks.html#boost_chrono.reference.other_clocks.thread_clock_hpp.thread_clock" title="
+ Class thread_clock"><code class="computeroutput"><span class="identifier">thread_clock</span></code></a><span class="special">::</span><span class="identifier">duration</span></code>, you can get the representation
+ type with <code class="computeroutput"><a href="../reference/other_clocks.html#boost_chrono.reference.other_clocks.thread_clock_hpp.thread_clock" title="
+ Class thread_clock"><code class="computeroutput"><span class="identifier">thread_clock</span></code></a><span class="special">::</span><span class="identifier">rep</span></code>, and the tick period with <code class="computeroutput"><a href="../reference/other_clocks.html#boost_chrono.reference.other_clocks.thread_clock_hpp.thread_clock" title="
+ Class thread_clock"><code class="computeroutput"><span class="identifier">thread_clock</span></code></a><span class="special">::</span><span class="identifier">period</span></code> (which should be a type <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a> which has nested values
<code class="computeroutput"><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special">::</span><span class="identifier">num</span></code> and <code class="computeroutput"><a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.ratio_hpp.ratio" title=" Class
- Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special">::</span><span class="identifier">den</span></code>). The tick period of __thread<span class="underline">clock</span>_ is <code class="computeroutput"><span class="identifier">__thread_clock__</span><span class="special">::</span><span class="identifier">period</span><span class="special">::</span><span class="identifier">num</span> <span class="special">/</span> <span class="identifier">__thread_clock__</span><span class="special">::</span><span class="identifier">period</span><span class="special">::</span><span class="identifier">den</span></code>
- seconds: 1/1000000000 in this case (<code class="computeroutput"><span class="number">1</span></code>
- billionth of a second), stored in a <code class="computeroutput"><span class="keyword">long</span>
- <span class="keyword">long</span></code>.
+ Template ratio<>"><code class="computeroutput"><span class="identifier">ratio</span></code></a><span class="special">::</span><span class="identifier">den</span></code>). The tick period of <a href="../reference/other_clocks.html#boost_chrono.reference.other_clocks.thread_clock_hpp.thread_clock" title="
+ Class thread_clock"><code class="computeroutput"><span class="identifier">thread_clock</span></code></a> is <code class="computeroutput"><a href="../reference/other_clocks.html#boost_chrono.reference.other_clocks.thread_clock_hpp.thread_clock" title="
+ Class thread_clock"><code class="computeroutput"><span class="identifier">thread_clock</span></code></a><span class="special">::</span><span class="identifier">period</span><span class="special">::</span><span class="identifier">num</span> <span class="special">/</span> <a href="../reference/other_clocks.html#boost_chrono.reference.other_clocks.thread_clock_hpp.thread_clock" title="
+ Class thread_clock"><code class="computeroutput"><span class="identifier">thread_clock</span></code></a><span class="special">::</span><span class="identifier">period</span><span class="special">::</span><span class="identifier">den</span></code> seconds: 1/1000000000 in this case
+ (<code class="computeroutput"><span class="number">1</span></code> billionth of a second),
+ stored in a <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">long</span></code>.
</p>
<p>
If you need to use <a href="../reference/cpp0x.html#boost_chrono.reference.cpp0x.chrono_chrono_hpp.duration_cast" title="
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-09-04 08:58:51 EDT (Sat, 04 Sep 2010)
@@ -95,7 +95,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: September 03, 2010 at 17:04:21 GMT</small></p></td>
+<td align="left"><p><small>Last revised: September 04, 2010 at 12:19:14 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
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