Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r74787 - branches/release/libs/chrono/doc
From: vicente.botet_at_[hidden]
Date: 2011-10-07 19:18:23


Author: viboes
Date: 2011-10-07 19:18:23 EDT (Fri, 07 Oct 2011)
New Revision: 74787
URL: http://svn.boost.org/trac/boost/changeset/74787

Log:
Chrono: document 1.2 update
Text files modified:
   branches/release/libs/chrono/doc/chrono.qbk | 2068 +++++++++++++++++++++++++++------------
   1 files changed, 1416 insertions(+), 652 deletions(-)

Modified: branches/release/libs/chrono/doc/chrono.qbk
==============================================================================
--- branches/release/libs/chrono/doc/chrono.qbk (original)
+++ branches/release/libs/chrono/doc/chrono.qbk 2011-10-07 19:18:23 EDT (Fri, 07 Oct 2011)
@@ -19,7 +19,7 @@
     [category utilities system]
     [id chrono]
     [dirname chrono]
- [purpose
+ [purpose
         Useful time utilities.
     ]
     [license
@@ -29,8 +29,10 @@
     ]
 ]
 
+
 [/==================]
 [def __Boost_Chrono__ [*Boost.Chrono]]
+[def __Boost_Chrono [*Boost.Chrono]]
 
 [def __see_bellow__ ['see bellow]]
 
@@ -47,7 +49,9 @@
 [def __remarks [*Remarks:]]
 [def __effects [*Effects:]]
 [def __post_conditions [*PostConditions:]]
+[def __postcondition [*PostConditions:]]
 [def __pre_conditions [*PreConditions:]]
+[def __precondition [*PreConditions:]]
 [def __requires [*Requires:]]
 
 [template mu[]'''μ'''] [/ µ Greek small letter mu]
@@ -111,20 +115,99 @@
 
 
 
-[template clock_concept_link[link_text] [link chrono.reference.cpp0x.clock [link_text]]]
-[def __clock_req [clock_concept_link `Clock`] requirements]
-[def __Clock [clock_concept_link `Clock`]]
-[def __Clock_s [clock_concept_link `Clock`'s]]
-
+[def __clock_req [link chrono.reference.cpp0x.clock `Clock`] requirements]
+[def __Clock [link chrono.reference.cpp0x.clock `Clock`]]
+[def __Clock [link chrono.reference.cpp0x.clock `Clock`'s]]
+[def __TrivialClock [link chrono.reference.cpp0x.clock `TrivialClock`]]
+
+[def __To [link chrono.reference.cpp0x.duration_hpp.duration `To`]]
+[def __ToDuration [link chrono.reference.cpp0x.duration_hpp.duration `ToDuration`]]
+[def __Duration [link chrono.reference.cpp0x.duration_hpp.duration `Duration`]]
+[def __Duration1 [link chrono.reference.cpp0x.duration_hpp.duration `Duration1`]]
+[def __Duration2 [link chrono.reference.cpp0x.duration_hpp.duration `Duration2`]]
 [def __duration [link chrono.reference.cpp0x.duration_hpp.duration `duration`]]
 [def __durations [link chrono.reference.cpp0x.duration_hpp.duration `duration`]s]
 [def __duration_s [link chrono.reference.cpp0x.duration_hpp.duration `duration`]'s]
 
+[def __duration__c_0 [link chrono.reference.cpp0x.duration_hpp.duration.duration_c_0 `duration`]]
+[def __duration__c_1 [link chrono.reference.cpp0x.duration_hpp.duration.duration_c_1 `duration`]]
+[def __duration__c_2 [link chrono.reference.cpp0x.duration_hpp.duration.duration_c_2 `duration`]]
+[def __duration__count [link chrono.reference.cpp0x.duration_hpp.duration.count `count`]]
+[def __duration__op_unary_plus [link chrono.reference.cpp0x.duration_hpp.duration.op_plus `operator+`]]
+[def __duration__op_unary_minus [link chrono.reference.cpp0x.duration_hpp.duration.op_minus `operator-`]]
+[def __duration__op_pre_inc [link chrono.reference.cpp0x.duration_hpp.duration.op_pre_inc `operator++`]]
+[def __duration__op_post_inc [link chrono.reference.cpp0x.duration_hpp.duration.op_post_inc `operator++`]]
+[def __duration__op_pre_dec [link chrono.reference.cpp0x.duration_hpp.duration.op_pre_dec `operator--`]]
+[def __duration__op_post_dec [link chrono.reference.cpp0x.duration_hpp.duration.op_post_dec `operator--`]]
+[def __duration__op_plus_eq [link chrono.reference.cpp0x.duration_hpp.duration.op_plus_eq `operator+=`]]
+[def __duration__op_minus_eq [link chrono.reference.cpp0x.duration_hpp.duration.op_minus_eq `operator-=`]]
+[def __duration__op_mult_eq [link chrono.reference.cpp0x.duration_hpp.duration.op_mult_eq `operator*=`]]
+[def __duration__op_div_eq [link chrono.reference.cpp0x.duration_hpp.duration.op_div_eq `operator/=`]]
+[def __duration__op_mod_eq [link chrono.reference.cpp0x.duration_hpp.duration.op_mod_eq `operator%=`]]
+[def __duration__op_mod_eq2 [link chrono.reference.cpp0x.duration_hpp.duration.op_mod_eq2 `operator%=`]]
+[def __duration__zero [link chrono.reference.cpp0x.duration_hpp.duration.zero `zero`]]
+[def __duration__min [link chrono.reference.cpp0x.duration_hpp.duration.min `min`]]
+[def __duration__max [link chrono.reference.cpp0x.duration_hpp.duration.max `max`]]
+[def __duration__op_plus_1 [link chrono.reference.cpp0x.duration_hpp.arith.duration__op_plus_1 `operator+`]]
+[def __duration__op_minus_1 [link chrono.reference.cpp0x.duration_hpp.arith.duration__op_minus_1 `operator-`]]
+[def __duration__op_mult_1 [link chrono.reference.cpp0x.duration_hpp.arith.duration__op_mult_1 `operator*`]]
+[def __duration__op_mult_2 [link chrono.reference.cpp0x.duration_hpp.arith.duration__op_mult_2 `operator*`]]
+[def __duration__op_div_1 [link chrono.reference.cpp0x.duration_hpp.arith.duration__op_div_1 `operator/`]]
+[def __duration__op_div_2 [link chrono.reference.cpp0x.duration_hpp.arith.duration__op_div_2 `operator/`]]
+[def __duration__op_div_3 [link chrono.reference.cpp0x.duration_hpp.arith.duration__op_div_3 `operator/`]]
+[def __duration__op_mod_1 [link chrono.reference.cpp0x.duration_hpp.arith.duration__op_mod_1 `operator%`]]
+[def __duration__op_mod_2 [link chrono.reference.cpp0x.duration_hpp.arith.duration__op_mod_2 `operator%`]]
+[def __duration__op_eq_1 [link chrono.reference.cpp0x.duration_hpp.cmp.duration__op_eq_1 `operator==`]]
+[def __duration__op_neq_1 [link chrono.reference.cpp0x.duration_hpp.cmp.duration__op_neq_1 `operator!=`]]
+[def __duration__op_lt_1 [link chrono.reference.cpp0x.duration_hpp.cmp.duration__op_lt_1 `operator<`]]
+[def __duration__op_leq_1 [link chrono.reference.cpp0x.duration_hpp.cmp.duration__op_leq_1 `operator<=`]]
+[def __duration__op_gt_1 [link chrono.reference.cpp0x.duration_hpp.cmp.duration__op_gt_1 `operator>`]]
+[def __duration__op_geq_1 [link chrono.reference.cpp0x.duration_hpp.cmp.duration__op_geq_1 `operator>=`]]
+
+
+
 [/==================]
 [def __time_point [link chrono.reference.cpp0x.time_point_hpp.time_point `time_point`]]
 [def __time_points [link chrono.reference.cpp0x.time_point_hpp.time_point `time_point`]s]
 [def __time_point_s [link chrono.reference.cpp0x.time_point_hpp.time_point `time_point`]'s]
 
+
+[def __time_point__c_1 [link chrono.reference.cpp0x.time_point_hpp.time_point.time_point_c_1 `time_point`]]
+[def __time_point__c_2 [link chrono.reference.cpp0x.time_point_hpp.time_point.time_point_c_2 `time_point`]]
+[def __time_point__c_3 [link chrono.reference.cpp0x.time_point_hpp.time_point.time_point_c_3 `time_point`]]
+[def __time_point__time_since_epoch [link chrono.reference.cpp0x.time_point_hpp.time_point.time_since_epoch `time_since_epoch`]]
+[def __time_point__op_unary_plus [link chrono.reference.cpp0x.time_point_hpp.time_point.op_unary_plus `operator+`]]
+[def __time_point__op_unary_minus [link chrono.reference.cpp0x.time_point_hpp.time_point.op_unary_minus `operator-`]]
+[def __time_point__op_pre_inc [link chrono.reference.cpp0x.time_point_hpp.time_point.op_pre_inc `operator++`]]
+[def __time_point__op_post_inc [link chrono.reference.cpp0x.time_point_hpp.time_point.op_post_inc `operator++`]]
+[def __time_point__op_pre_dec [link chrono.reference.cpp0x.time_point_hpp.time_point.op_pre_dec `operator--`]]
+[def __time_point__op_post_dec [link chrono.reference.cpp0x.time_point_hpp.time_point.op_post_dec `operator--`]]
+[def __time_point__op_plus_eq_1[link chrono.reference.cpp0x.time_point_hpp.time_point.op_plus_eq_1 `operator+=`]]
+[def __time_point__op_plus_eq_2[link chrono.reference.cpp0x.time_point_hpp.time_point.op_plus_eq_2 `operator+=`]]
+[def __time_point__op_minus_eq_1 [link chrono.reference.cpp0x.time_point_hpp.time_point.op_minus_eq_1 `operator-=`]]
+[def __time_point__op_minus_eq_2 [link chrono.reference.cpp0x.time_point_hpp.time_point.op_minus_eq_2 `operator-=`]]
+[def __time_point__min [link chrono.reference.cpp0x.time_point_hpp.time_point.min `min`]]
+[def __time_point__max [link chrono.reference.cpp0x.time_point_hpp.time_point.max `max`]]
+[def __time_point__op_plus_1 [link chrono.reference.cpp0x.time_point_hpp.arith.time_point__op_plus_1 `operator+`]]
+[def __time_point__op_plus_2 [link chrono.reference.cpp0x.time_point_hpp.arith.time_point__op_plus_2 `operator+`]]
+[def __time_point__op_minus_1 [link chrono.reference.cpp0x.time_point_hpp.arith.time_point__op_minus_1 `operator-`]]
+[def __time_point__op_minus_2 [link chrono.reference.cpp0x.time_point_hpp.arith.time_point__op_minus_2 `operator-`]]
+[def __time_point__op_mult_1 [link chrono.reference.cpp0x.time_point_hpp.arith.time_point__op_mult_1 `operator*`]]
+[def __time_point__op_mult_2 [link chrono.reference.cpp0x.time_point_hpp.arith.time_point__op_mult_2 `operator*`]]
+[def __time_point__op_div_1 [link chrono.reference.cpp0x.time_point_hpp.arith.time_point__op_div_1 `operator/`]]
+[def __time_point__op_div_2 [link chrono.reference.cpp0x.time_point_hpp.arith.time_point__op_div_2 `operator/`]]
+[def __time_point__op_div_3 [link chrono.reference.cpp0x.time_point_hpp.arith.time_point__op_div_3 `operator/`]]
+[def __time_point__op_mod_1 [link chrono.reference.cpp0x.time_point_hpp.arith.time_point__op_mod_1 `operator%`]]
+[def __time_point__op_mod_2 [link chrono.reference.cpp0x.time_point_hpp.arith.time_point__op_mod_2 `operator%`]]
+[def __time_point__op_eq [link chrono.reference.cpp0x.time_point_hpp.cmp.time_point__op_eq `operator==`]]
+[def __time_point__op_neq [link chrono.reference.cpp0x.time_point_hpp.cmp.time_point__op_neq `operator!=`]]
+[def __time_point__op_lt [link chrono.reference.cpp0x.time_point_hpp.cmp.time_point__op_lt `operator<`]]
+[def __time_point__op_leq [link chrono.reference.cpp0x.time_point_hpp.cmp.time_point__op_leq `operator<=`]]
+[def __time_point__op_gt [link chrono.reference.cpp0x.time_point_hpp.cmp.time_point__op_gt `operator>`]]
+[def __time_point__op_geq [link chrono.reference.cpp0x.time_point_hpp.cmp.time_point__op_geq `operator>=`]]
+
+
+
 [/==================]
 [def __system_clock [link chrono.reference.cpp0x.system_clocks_hpp.system_clock `system_clock`]]
 [def __steady_clock [link chrono.reference.cpp0x.system_clocks_hpp.steady_clock `steady_clock`]]
@@ -145,7 +228,7 @@
 
 [def __nanoseconds [link chrono.reference.cpp0x.duration_hpp.duration_typedefs `nanoseconds`]]
 [def __microseconds [link chrono.reference.cpp0x.duration_hpp.duration_typedefs `microseconds`]]
-[def __milliseconds__ [link chrono.reference.cpp0x.duration_hpp.duration_typedefs `milliseconds`]]
+[def __milliseconds [link chrono.reference.cpp0x.duration_hpp.duration_typedefs `milliseconds`]]
 [def __seconds [link chrono.reference.cpp0x.duration_hpp.duration_typedefs `seconds`]]
 [def __minutes [link chrono.reference.cpp0x.duration_hpp.duration_typedefs `minutes`]]
 [def __hours [link chrono.reference.cpp0x.duration_hpp.duration_typedefs `hours`]]
@@ -162,9 +245,100 @@
 
 
 [/==================]
-
 [def __duration_punct [link chrono.reference.io.chrono_io_hpp.duration_punct `duration_punct`]]
 
+[/
+[def __duration_punct [link chrono.reference.io.duration_io_hpp.duration_punct `duration_punct`]]
+[def __duration_punct__c1 [link chrono.reference.io.duration_io_hpp.duration_punct.c1 `duration_punct`]]
+[def __duration_punct__c2 [link chrono.reference.io.duration_io_hpp.duration_punct.c2 `duration_punct`]]
+[def __duration_punct__is_prefix_name [link chrono.reference.io.duration_io_hpp.duration_punct.is_prefix_name `is_prefix_name`]]
+[def __duration_punct__is_symbol_name [link chrono.reference.io.duration_io_hpp.duration_punct.is_symbol_name `is_symbol_name`]]
+[def __duration_punct__get_duration_style [link chrono.reference.io.duration_io_hpp.duration_punct.get_duration_style `get_duration_style`]]
+
+[def __duration_style_ns [link chrono.reference.io.duration_io_hpp.duration_style `duration_style`]]
+[def __duration_style [link chrono.reference.io.duration_io_hpp.duration_style `duration_style_type`]]
+[def __duration_style_type [link chrono.reference.io.duration_io_hpp.duration_style `duration_style_type`]]
+[def __prefix [link chrono.reference.io.duration_io_hpp.duration_style `prefix`]]
+[def __symbol [link chrono.reference.io.duration_io_hpp.duration_style `symbol`]]
+
+[def __duration_fmt [link chrono.reference.io.duration_io_hpp.manipulators.duration_fmt `duration_fmt`]]
+[def __duration_fmt__c1 [link chrono.reference.io.duration_io_hpp.manipulators.duration_fmt.c1 `duration_fmt`]]
+[def __duration_fmt__op_duration_style [link chrono.reference.io.duration_io_hpp.manipulators.duration_fmt.op_duration_style `operator duration_style_type`]]
+[def __duration_fmt__get_duration_style [link chrono.reference.io.duration_io_hpp.manipulators.duration_fmt.op_duration_style `get_duration_style`]]
+[def __duration_fmt__op_in [link chrono.reference.io.duration_io_hpp.manipulators.duration_fmt.op_in `operator >>`]]
+[def __duration_fmt__op_out [link chrono.reference.io.duration_io_hpp.manipulators.duration_fmt.op_out `operator <<`]]
+
+[def __duration_short [link chrono.reference.io.duration_io_hpp.manipulators `duration_short`]]
+[def __duration_long [link chrono.reference.io.duration_io_hpp.manipulators `duration_long`]]
+
+[def __duration_style_io_saver [link chrono.reference.io.duration_io_hpp.ioss.duration_style_io_saver `duration_style_io_saver`]]
+[def __duration_style_io_saver__c1 [link chrono.reference.io.duration_io_hpp.ioss.duration_style_io_saver.c1 `duration_style_io_saver`]]
+[def __duration_style_io_saver__c2 [link chrono.reference.io.duration_io_hpp.ioss.duration_style_io_saver.c2 `duration_style_io_saver`]]
+[def __duration_style_io_saver__d [link chrono.reference.io.duration_io_hpp.ioss.duration_style_io_saver.d `~duration_style_io_saver`]]
+[def __duration_style_io_saver__restore [link chrono.reference.io.duration_io_hpp.ioss.duration_style_io_saver.restore `restore`]]
+
+[def __duration__op_in [link chrono.reference.io.duration_io_hpp.streams.duration__op_in `operator >>`]]
+[def __duration__op_out [link chrono.reference.io.duration_io_hpp.streams.duration__op_out `operator <<`]]
+
+
+[/==================]
+
+[def __timezone_ns [link chrono.reference.io.time_point_io_hpp.timezone `timezone`]]
+[def __timezone [link chrono.reference.io.time_point_io_hpp.timezone `timezone_type`]]
+[def __udt [link chrono.reference.io.time_point_io_hpp.timezone `udt`]]
+[def __local [link chrono.reference.io.time_point_io_hpp.timezone `local`]]
+
+[def __time_punct [link chrono.reference.io.time_point_io_hpp.time_punct `time_punct`]]
+[def __time_punct__c1 [link chrono.reference.io.time_point_io_hpp.time_punct.c1 `time_punct`]]
+[def __time_punct__c2 [link chrono.reference.io.time_point_io_hpp.time_punct.c2 `time_punct`]]
+
+
+[def __time_fmt1 [link chrono.reference.io.time_point_io_hpp.manip.time_fmt1 `time_fmt`]]
+[def __time_fmt2 [link chrono.reference.io.time_point_io_hpp.manip.time_fmt2 `time_fmt`]]
+
+[def __timezone_io_saver [link chrono.reference.io.time_point_io_hpp.ioss.timezone_io_saver `timezone_io_saver`]]
+[def __timezone_io_saver__c1 [link chrono.reference.io.time_point_io_hpp.ioss.timezone_io_saver.c1 `timezone_io_saver`]]
+[def __timezone_io_saver__c2 [link chrono.reference.io.time_point_io_hpp.ioss.timezone_io_saver.c2 `timezone_io_saver`]]
+[def __timezone_io_saver__d [link chrono.reference.io.time_point_io_hpp.ioss.timezone_io_saver.d `~timezone_io_saver`]]
+[def __timezone_io_saver__restore [link chrono.reference.io.time_point_io_hpp.ioss.timezone_io_saver.restore `restore`]]
+
+[def __time_fmt_io_saver [link chrono.reference.io.time_point_io_hpp.ioss.time_fmt_io_saver `time_fmt_io_saver`]]
+[def __time_fmt_io_saver__c1 [link chrono.reference.io.time_point_io_hpp.ioss.time_fmt_io_saver.c1 `time_fmt_io_saver`]]
+[def __time_fmt_io_saver__c2 [link chrono.reference.io.time_point_io_hpp.ioss.time_fmt_io_saver.c2 `time_fmt_io_saver`]]
+[def __time_fmt_io_saver__d [link chrono.reference.io.time_point_io_hpp.ioss.time_fmt_io_saver.d `~time_fmt_io_saver`]]
+[def __time_fmt_io_saver__restore [link chrono.reference.io.time_point_io_hpp.ioss.time_fmt_io_saver.restore `restore`]]
+]
+[/==================]
+
+[def __round [link chrono.reference.round.round_hpp `round`]]
+[def __ceil [link chrono.reference.round.ceil_hpp `ceil`]]
+[def __floor [link chrono.reference.round.floor_hpp `floor`]]
+
+[/==================]
+
+[def __Stopwatch [link chrono.reference.stopwatches.simple_stopwatch_req `SimpleStopwatch`]]
+[def __SimpleStopwatch [link chrono.reference.stopwatches.simple_stopwatch_req `SimpleStopwatch`]]
+[def __simple_stopwatch_concept [link chrono.reference.stopwatches.simple_stopwatch_req `SimpleStopwatch`]]
+[def __simple_stopwatch [link chrono.reference.stopwatches.simple_stopwatch_hpp.simple_stopwatch `simple_stopwatch`]]
+[def __simple_stopclock [link chrono.reference.stopwatches.simple_stopwatch_hpp.simple_stopwatch `simple_clock`]]
+[def __stopwatch [link chrono.reference.stopwatches.simple_stopwatch_hpp.simple_stopwatch `simple_stopwatch`]]
+
+
+[def __BasicStopwatch [link chrono.reference.stopwatches.stopwatch_req `BasicStopwatch`]]
+[def __basic_stopwatch_concept [link chrono.reference.stopwatches.stopwatch_req `BasicStopwatch`]]
+[def __basic_stopwatch [link chrono.reference.stopwatches.stopwatch_hpp.simple_stopwatch `basic_stopwatch`]]
+[def __basic_stopclock [link chrono.reference.stopwatches.stopwatch_hpp.simple_stopwatch `basic_stopclock`]]
+
+[def __SuspendableStopwatch [link chrono.reference.stopwatches.suspendable_stopwatch_req `SuspendableStopwatch`]]
+[def __suspendable_stopwatch_concept [link chrono.reference.stopwatches.suspendable_stopwatch_req `SuspendableStopwatch`]]
+[def __suspendable_stopwatch [link chrono.reference.stopwatches.suspendable_stopwatch_hpp.simple_stopwatch `suspendable_stopwatch`]]
+[def __suspendable_stopclock [link chrono.reference.stopwatches.suspendable_stopwatch_hpp.simple_stopwatch `suspendable_stopclock`]]
+
+[def __stopwatch_reporter `stopwatch_reporter `]
+[def __stopclock `stopclock `]
+[def __Formatter `Formatter`]
+[def __Formatters `Formatter`s]
+
 
 [/===============]
 [section Overview]
@@ -242,6 +416,39 @@
 [/These clocks capture the specific time unitarily. __Boost_Chrono__ provides also a clock __process_cpu_clock that captures the three times at once.
 ]
 
+[/ //////////////////////////////////////////////////////////
+
+[heading Measuring elapsed time]
+
+Knowing how long a program, a function or a specific code block takes to execute is useful in both test and production environments.
+__Boost_Chrono introduces the __simple_stopwatch_concept concept which is a mechanism to measure the elapsed time.
+__simple_stopwatch`<>` is the basic model of __simple_stopwatch_concept.
+
+[heading Reporting elapsed time]
+
+It is often necessary to report elapsed time on a user display or in a log file. __stopwatch_reporter provides a runtime reporting mechanism for this purpose which can be invoked in just one line of code.
+
+ using namespace boost::chrono;
+ int main()
+ {
+ stopwatch_reporter<stopwatch<process_cpu_clocks> > _;
+ // ...
+ }
+
+Will produce the following output
+
+ real 0.034s, cpu 0.031s (93.0%), user 0.031s, system 0.000s
+
+As this is one of the expression more commonly use, the library provides a __stopclock shortcut so the preceding can be written as
+
+ int main()
+ {
+ stopclock<process_cpu_clocks> _;
+ // ...
+ }
+
+] [/ //////////////////////////////////////////////////////////]
+
 
 [endsect]
 
@@ -278,6 +485,48 @@
 It provides I/O for __duration and __time_point. It builds on `<boost/ratio/ratio_io.hpp>` to provide readable and flexible formatting and parsing for types in `<boost/chrono.hpp>`. The __duration unit names can be customized through a new facet: __duration_punct.
 
 
+[/ //////////////////////////////////////////////////////////
+
+[heading I/O]
+
+It provides I/O for __duration and __time_point. This I/O makes use of these types much more convenient. In following the "you only pay for what you use" philosophy, this extra functionality is located in a header separate from <boost/chrono/chrono.hpp>, namely <boost/chrono/chrono_io.hpp>.
+
+It builds on `<boost/ratio/ratio_io.hpp>` to provide readable and flexible formatting and parsing for types in `<boost/chrono.hpp>`.
+This textural representation uses [@http://en.wikipedia.org/wiki/SI_prefix#List_of_SI_prefixes SI prefixes] whenever possible. This makes it easy for `boost::milliseconds` to be represented by the text "milliseconds", or a hypothetical meter class to print out "millimeter".
+The __duration unit names can be customized through a new facet: __duration_punct.
+
+`system_clock::time_point` I/O is proposed in terms of UTC timepoints, strongly guided by ISO 9899:1999, Programming languages - C, ISO 9945:2003, Information Technology - Portable Operating System Interface (POSIX) and ISO 8601:2004, Data elements and interchange formats - Information interchange - Representation of dates and times.
+
+] [/ //////////////////////////////////////////////////////////]
+
+[heading Rounding utilities]
+
+A few simple rounding utility functions for working with durations.
+
+[/ //////////////////////////////////////////////////////////
+[heading Stopwatch/Stopclocks framework]
+
+On top of the core facilities, __Boost_Chrono provides:
+
+* Stopwatches: Some facility to measure elapsed time with the ability to start, stop, suspend, or resume measurement.
+ * __SimpleStopwatch concept.
+ * __BasicStopwatch concept.
+ * __SuspendableStopwatch concept.
+ * __simple_stopwatch, model of __SimpleStopwatch capturing elapsed __Clock times.
+ * __basic_stopwatch, model of __BasicStopwatch allowing in addition to start and stop the capture of elapsed __Clock times.
+ * __suspendable_stopwatch, model of __SuspendableStopwatch allowing in addition to suspend and resume the capture of elapsed __Clock times.
+
+__basic_stopwatch and __suspendable_stopwatch have LapsCollector template parameter that allows to store information of the samples defined by a cycle start-stop.
+
+* Stopclocks: a complete time reporting package that can be invoked in a single line of code.
+ * __stopwatch_reporter`<__Stopwatch,__Formatter>`, convenient reporting to an output stream (including wide char streams) of the elapsed time of models of __Stopwatch results.
+ * Some basic __Formatters.
+ * `__simple_stopclock<__Clock>` shortcut of `__stopwatch_reporter<__simple_stopwatch<__Clock>>`
+ * `__basic_stopclock<__Clock>` shortcut of `__stopwatch_reporter<__basic_stopwatch<__Clock>>`
+ * `__suspendable_stopclock<__Clock>` shortcut of `__stopwatch_reporter<__suspendable_stopwatch<__Clock>>`
+
+] [/ //////////////////////////////////////////////////////////]
+
 [heading Caveat Emptor]
 
 The underlying clocks provided by operating systems are subject to many seemingly arbitrary policies and implementation irregularities. That's a polite way of saying they tend to be flakey, and each operating system or even each clock has its own cruel and unusual forms of flakiness. Don't bet the farm on their accuracy, unless you have become deeply familiar with exactly what the specific operating system is guaranteeing, which is often very little.
@@ -328,8 +577,6 @@
 [heading Requirements]
 [/===================]
 
-[caution __Boost_Chrono__ depends on some new traits in [*Boost.TypeTraits] which have been added on Boost 1.45.]
-
 In particular, __Boost_Chrono__ depends on:
 
 [variablelist
@@ -392,41 +639,35 @@
 [/========================]
 
 The implementation will eventually work with most C++03 conforming compilers.
-Current version has been tested on:
+Currently I use to test with on:
 
 Windows with
 
 * MSVC 10.0
 
-Cygwin 1.5 with
-
-* GCC 3.4.4
-
 Cygwin 1.7 with
 
 * GCC 4.3.4
 
 MinGW with
 
-* GCC 4.4.0
 * GCC 4.5.0
 * GCC 4.5.0 -std=c++0x
+* GCC 4.5.2
+* GCC 4.5.2 -std=c++0x
 * GCC 4.6.0
 * GCC 4.6.0 -std=c++0x
 
-Ubuntu 10.10
-
-* GCC 4.4.5
-* GCC 4.4.5 -std=c++0x
-* GCC 4.5.1
-* GCC 4.5.1 -std=c++0x
-* clang 2.8
+OsX with
 
-Initial versions were tested on:
+* GCC 4.1.2
+* clang 1.6
+* clang 2.9
+* clang 2.9 -std=c++0x
 
-MacOS with GCC 4.2.4 (Some test are needed for the specific Mac files).
 
-Ubuntu Linux with GCC 4.2.4
+The committed code is tested with much more compilers. There are two compilers (VACPP and Borland) that don't provide the needed features.
+Other as Intel and Sun have some issues with i/o. While everything compiles and link correctly, there are some runtime issues I have not cached yet. See the regression tests for details.
 
 [note Please let us know how this works on other platforms/compilers.]
 
@@ -437,7 +678,7 @@
 [section Hello World! ]
 [/====================]
 
-If all you want to do is to time a program's execution, here is a complete program (stopclock_example.cpp):
+If all you want to do is to time a program's execution, here is a complete program:
 
     #include <boost/chrono.hpp>
     #include <cmath>
@@ -475,7 +716,7 @@
 * __hours
 * __minutes
 * __seconds
-* __milliseconds__
+* __milliseconds
 * __microseconds
 * __nanoseconds
 
@@ -545,7 +786,7 @@
 
     boost::chrono::__nanoseconds start;
     boost::chrono::__nanoseconds end;
- typedef boost::chrono::__milliseconds__ ms;
+ typedef boost::chrono::__milliseconds ms;
     ms d = boost::chrono::__duration_cast<ms>(end - start);
 
     // d now holds the number of milliseconds from start to end.
@@ -569,7 +810,7 @@
 
 If you need to use __duration_cast`<>`, but want to round up, instead of down when the conversion is inexact, here is a handy little helper function to do so. Writing it is actually a good starter project for understanding __Boost_Chrono__:
 
- template <class ToDuration, class Rep, class Period>
+ template <class __ToDuration, class Rep, class Period>
     ToDuration
     round_up(boost::chrono::__duration<Rep, Period> d)
     {
@@ -580,13 +821,97 @@
         return result;
     }
 
- typedef boost::chrono::__milliseconds__ ms;
+ typedef boost::chrono::__milliseconds ms;
     ms d = round_up<ms>(end - start);
     // d now holds the number of milliseconds from start to end, rounded up.
     std::cout << ms.count() << "ms\n";
 
 [endsect]
 
+[section:round Rounding functions]
+
+
+__Boost_Chrono__ provides few simple rounding utility functions for working with durations.
+
+
+ // round down
+ template <class __To, class Rep, class Period>
+ To
+ floor(const duration<Rep, Period>& d)
+ {
+ return duration_cast<To>(d);
+ }
+
+ // round to nearest, to even on tie
+ template <class __To, class Rep, class Period>
+ To
+ round(const duration<Rep, Period>& d)
+ {
+ To t0 = duration_cast<To>(d);
+ To t1 = t0;
+ ++t1;
+ BOOST_AUTO(diff0, d - t0);
+ BOOST_AUTO(diff1, t1 - d);
+ if (diff0 == diff1)
+ {
+ if (t0.count() & 1)
+ return t1;
+ return t0;
+ }
+ else if (diff0 < diff1)
+ return t0;
+ return t1;
+ }
+ // round up
+ template <class __To, class Rep, class Period>
+ To
+ ceil(const duration<Rep, Period>& d)
+ {
+ To t = duration_cast<To>(d);
+ if (t < d)
+ ++t;
+ return t;
+ }
+
+
+The beauty of the chrono library is the ease and accuracy with which such conversions can be made. For example to convert from __milliseconds (`1/1000` of a second), to `1/30` of a second, one must multiply the milliseconds by `0.03`. It is common knowledge that you can't exactly represent `0.03` in a computer. Nevertheless round will exactly (with no round off error) detect a tie and round to even when this happens. The differences `diff0` and `diff1` are not approximate, but exact differences, even when `d` has the units of millisecond and `To` is `1/30` of a second. The unit of `diff0` and `diff1` is `1/3000` of a second which both millisecond and `1/30` of a second exactly convert to (with no truncation error).
+
+Similarly, the comparison `t < d` in __ceil is exact, even when there is no exact conversion between `t` and `d`.
+Example use of rounding functions
+
+ #include <iostream>
+ #include <boost/chrono/chrono_io.hpp>
+ #include <boost/chrono/floor.hpp>
+ #include <boost/chrono/round.hpp>
+ #include <boost/chrono/ceil.hpp>
+
+ int main()
+ {
+ using namespace boost::chrono;
+ milliseconds ms(2500);
+ std::cout << floor<seconds>(ms) << '\n';
+ std::cout << round<seconds>(ms) << '\n';
+ std::cout << ceil<seconds>(ms) << '\n';
+ ms = milliseconds(2516);
+ typedef duration<long, boost::ratio<1, 30> > frame_rate;
+ std::cout << floor<frame_rate>(ms) << '\n';
+ std::cout << round<frame_rate>(ms) << '\n';
+ std::cout << ceil<frame_rate>(ms) << '\n';
+
+ return 0;
+ }
+
+The output of this program should be
+
+ 2 seconds
+ 2 seconds
+ 3 seconds
+ 75 [1/30]seconds
+ 75 [1/30]seconds
+ 76 [1/30]seconds
+
+[endsect]
+
 [section Trafficking in floating-point Durations]
 
 I don't want to deal with writing `duration_cast` all over the place. I'm content with the precision of my floating-point representation.
@@ -699,7 +1024,7 @@
 
 * __steady_clock can not be changed explicitly and the time since the initial epoch increase in a steady way.
 
-* __high_resolution_clock intend to use the system-wide clock provided by the platform with the higest resolution.
+* __high_resolution_clock intend to use the system-wide clock provided by the platform with the highest resolution.
 
 __Boost_Chrono__ provides them when supported by the underlying platform. A given platform may not be able to supply all three of these clocks.
 
@@ -715,7 +1040,7 @@
         typedef an arithmetic-like type rep;
         typedef an instantiation of ratio period;
         typedef boost::chrono::__duration<rep, period> __duration;
- typedef boost::chrono::__time_point<Clock> time_point;
+ typedef boost::chrono::__time_point<__Clock> time_point;
         static constexpr bool is_steady = true or false;
 
         static time_point now();
@@ -755,7 +1080,7 @@
 
 A __time_point has a clock and a __duration.
 
- template <class Clock, class Duration = typename Clock::duration> class __time_point;
+ template <class __Clock, class __Duration = typename Clock::duration> class __time_point;
 
 The __time_point's clock is not stored. It is simply embedded into the __time_point's type and serves two purposes:
 
@@ -887,7 +1212,7 @@
     boost::chrono::__thread_clock::time_point start=boost::chrono::__thread_clock::now();
     // ... do something ...
 
- typedef boost::chrono::__milliseconds__ ms;
+ typedef boost::chrono::__milliseconds ms;
     ms d = boost::chrono::__thread_clock::now() - start;
     // d now holds the number of milliseconds from start to end.
     std::cout << ms.count() << "ms\n";
@@ -1061,6 +1386,87 @@
 
 [endsect]
 
+
+[/ //////////////////////////////////////////////////////////
+[section Stopwatches and Stopclocks]
+
+At the user level, the main use case of measuring the elapsed time is to report these measures on the display. For example
+
+ using namespace boost::chrono;
+
+ int f1(long j) {
+ simple_stopwatch<> sw;
+
+ for ( long i = 0; i < j; ++i )
+ std::sqrt( 123.456L ); // burn some time
+
+ std::cout << sw.elapsed() << std::endl;
+ return 0;
+ }
+ int main() {
+ f1(100000);
+ f1(200000);
+ f1(300000);
+ return 0;
+ }
+
+Could produce the following output
+
+ 0.006s
+ 0.011s
+ 0.017s
+
+__stopwatch is a template class with a Clock as template parameter. The default __Clock is the __high_resolution_clock.
+
+We can replace the lines
+
+ simple_stopwatch <> sw;
+
+ ...
+ std::cout << sw.elapsed() << std::endl;
+
+using the __stopwatch_reporter`<>` class. THis class provides a run time reporting package that can be invoked in a single line of code to report the usage of a __Clock. For example
+
+ using namespace boost::chrono;
+
+ int f1(long j) {
+ stopwatch_reporter<simple_stopwatch <> > _;
+
+ 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;
+ }
+
+Which produce the same kind of output.
+
+__stopwatch_reporter is a template class with a __Stopwatch and a __Formatter as template parameter.
+
+We can use even a shorter line using the __stopclock class, which allows to replace
+
+ stopwatch_reporter<basic_stopwatch<> > _;
+
+by
+
+ stopclock<> _;
+
+As noted above, stopwatches and stopclocks are mainly used to count elapsed
+
+[section Formatting]
+
+The preceding examples just print the elapsed duration of the stopwatch. How can I for example print the
+
+[endsect]
+
+[endsect]
+] [/ //////////////////////////////////////////////////////////]
+
 [endsect]
 [/===============]
 [section Examples]
@@ -1270,9 +1676,9 @@
 
 Usage
 
- xtime xt = to_xtime_truncate(seconds(3) + boost::chrono::__milliseconds__(251));
+ xtime xt = to_xtime_truncate(seconds(3) + boost::chrono::__milliseconds(251));
         print(xt);
- boost::chrono::milliseconds ms = boost::chrono::__duration_cast<boost::chrono::__milliseconds__>(from_xtime(xt));
+ boost::chrono::milliseconds ms = boost::chrono::__duration_cast<boost::chrono::__milliseconds>(from_xtime(xt));
         std::cout << ms.count() << " milliseconds\n";
         xt = to_xtime_round_up(ms);
         print(xt);
@@ -1498,10 +1904,10 @@
 
 The user can define a function returning the earliest __time_point as follows:
 
- template <class Clock, class Duration1, class Duration2>
- typename boost::__common_type<__time_point<Clock, Duration1>,
- __time_point<Clock, Duration2> >::type
- min(__time_point<Clock, Duration1> t1, __time_point<Clock, Duration2> t2)
+ template <class __Clock, class __Duration1, class __Duration2>
+ typename boost::__common_type<__time_point<__Clock, __Duration1>,
+ __time_point<__Clock, __Duration2> >::type
+ min(__time_point<__Clock, __Duration1> t1, __time_point<__Clock, __Duration2> t2)
     {
         return t2 < t1 ? t2 : t1;
     }
@@ -1526,15 +1932,15 @@
 
     using namespace boost::chrono;
 
- template< class Clock >
+ template< class __Clock >
     class timer
     {
- typename Clock::time_point start;
+ typename __Clock::time_point start;
     public:
- timer() : start( Clock::now() ) {}
- typename Clock::duration elapsed() const
+ timer() : start( __Clock::now() ) {}
+ typename __Clock::duration elapsed() const
       {
- return Clock::now() - start;
+ return __Clock::now() - start;
       }
       double seconds() const
       {
@@ -1752,15 +2158,15 @@
             std::cout << "sleep_for " << t.count() << " microseconds\n";
     }
 
- template <class Clock, class Duration>
- void sleep_until(const chrono::__time_point<Clock, Duration>& t) {
+ template <class __Clock, class __Duration>
+ void sleep_until(const chrono::__time_point<__Clock, __Duration>& t) {
         using namespace chrono;
- typedef __time_point<Clock, Duration> Time;
+ typedef __time_point<__Clock, __Duration> Time;
         typedef __system_clock::time_point SysTime;
- if (t > Clock::now()) {
+ if (t > __Clock::now()) {
             typedef typename __common_type<typename Time::duration,
                                          typename SysTime::duration>::type D;
- /* auto */ D d = t - Clock::now();
+ /* auto */ D d = t - __Clock::now();
             microseconds us = __duration_cast<__microseconds>(d);
             if (us < d)
                 ++us;
@@ -1789,17 +2195,17 @@
             return true;
         }
 
- template <class Clock, class Duration>
- bool try_lock_until(const chrono::__time_point<Clock, Duration>& t)
+ template <class __Clock, class __Duration>
+ bool try_lock_until(const chrono::__time_point<__Clock, __Duration>& t)
         {
             using namespace chrono;
- typedef __time_point<Clock, Duration> Time;
+ typedef __time_point<__Clock, __Duration> Time;
             typedef __system_clock::time_point SysTime;
- if (t <= Clock::now())
+ if (t <= __Clock::now())
                 return try_lock();
             typedef typename __common_type<typename Time::duration,
- typename Clock::duration>::type D;
- /* auto */ D d = t - Clock::now();
+ typename __Clock::duration>::type D;
+ /* auto */ D d = t - __Clock::now();
             microseconds us = __duration_cast<__microseconds>(d);
             SysTime st = __system_clock::now() + us;
             std::cout << "try_lock_until ";
@@ -1825,16 +2231,16 @@
             return true;
         }
 
- template <class Clock, class Duration>
- bool wait_until(mutex&, const chrono::__time_point<Clock, Duration>& t) {
+ template <class __Clock, class __Duration>
+ bool wait_until(mutex&, const chrono::__time_point<__Clock, __Duration>& t) {
             using namespace boost::chrono;
- typedef __time_point<Clock, Duration> Time;
+ typedef __time_point<__Clock, __Duration> Time;
             typedef __system_clock::time_point SysTime;
- if (t <= Clock::now())
+ if (t <= __Clock::now())
                 return false;
             typedef typename __common_type<typename Time::duration,
- typename Clock::duration>::type D;
- /* auto */ D d = t - Clock::now();
+ typename __Clock::duration>::type D;
+ /* auto */ D d = t - __Clock::now();
             microseconds us = __duration_cast<__microseconds>(d);
             SysTime st = __system_clock::now() + us;
              std::cout << "wait_until ";
@@ -1856,10 +2262,10 @@
 
     this_thread::sleep_for(chrono::__seconds(3));
     this_thread::sleep_for(chrono::__nanoseconds(300));
- chrono::__system_clock::time_point time_limit = chrono::__system_clock::now() + chrono::__seconds_(4) + chrono::__milliseconds__(500);
+ chrono::__system_clock::time_point time_limit = chrono::__system_clock::now() + chrono::__seconds_(4) + chrono::__milliseconds(500);
     this_thread::sleep_until(time_limit);
 
- mut.try_lock_for(chrono::__milliseconds__(30));
+ mut.try_lock_for(chrono::__milliseconds(30));
     mut.try_lock_until(time_limit);
 
     cv.wait_for(m, chrono::__minutes(1)); // real code would put this in a loop
@@ -1953,9 +2359,11 @@
 [section:reference Reference ]
 [/=================]
 
-As `constexpr` will not be supported by some compilers, it is replaced in the code by BOOST_CHRONO_CONSTEXPR for constexpr functions and BOOST_CHRONO_STATIC_CONSTEXPR for struct/class static fields. The documentation doesn't use these macros.
+As `constexpr` will not be supported by some compilers, it is replaced in the code by BOOST_CHRONO_CONSTEXPR for constexpr functions and BOOST_CHRONO_STATIC_CONSTEXPR for struct/class static fields. The same applies to `noexecpt` which is replaced by BOOST_CHRONO_NOEXCEPT in the code.
 
-[section:cpp0x Included on the C++0x Recommendation]
+The documentation doesn't use these macros.
+
+[section:cpp0x Included on the C++11 Recommendation]
 
 
 [/=============================================]
@@ -1969,10 +2377,7 @@
 
 [section:limitations Limitations and Extensions]
 
-Next follows limitation respect to the C++0x recomendations:
-
-* constexpr not tested yet.
-* The recently steady_clock approved is not yet included.
+Next follows some limitation respect to the C++0x recomendations:
 
 The current implementation provides in addition:
 
@@ -1980,7 +2385,7 @@
 * process and thread clocks.
 
 
-[endsect]
+[endsect] [/section:limitations Limitations and Extensions]
 
 [section:conf Configuration Macros]
 
@@ -2015,14 +2420,12 @@
 
 If in addition `BOOST_USE_WINDOWS_H` is defined `<windows.h>` is included, otherwise files in `boost/detail/win` are used to reduce the impact of including `<windows.h>`.
 
-[endsect]
-
-
-[endsect]
+[endsect] [/section:header_only How to Build Boost.Chrono as a Header Only Library?]
 
+[endsect] [/section:conf Configuration Macros]
 
+[endsect] [/section:chrono_hpp Header `<boost/chrono.hpp>`]
 
-[endsect]
 
 [/=============================================]
 [section:duration_hpp Header `<boost/chrono/duration.hpp>`]
@@ -2048,87 +2451,95 @@
 
         // duration arithmetic
         template <class Rep1, class Period1, class Rep2, class Period2>
+ constexpr
         typename common_type<duration<Rep1, Period1>, duration<Rep2, Period2> >::type
- operator+(
+ __duration__op_plus_1(
             const duration<Rep1, Period1>& lhs,
             const duration<Rep2, Period2>& rhs);
 
         template <class Rep1, class Period1, class Rep2, class Period2>
+ constexpr
         typename common_type<duration<Rep1, Period1>, duration<Rep2, Period2> >::type
- operator-(
+ __duration__op_minus_1(
             const duration<Rep1, Period1>& lhs,
             const duration<Rep2, Period2>& rhs);
 
         template <class Rep1, class Period, class Rep2>
+ constexpr
         duration<typename common_type<Rep1, Rep2>::type, Period>
- operator*(
+ __duration__op_mult_1(
             const duration<Rep1, Period>& d,
             const Rep2& s);
 
         template <class Rep1, class Period, class Rep2>
+ constexpr
         duration<typename common_type<Rep1, Rep2>::type, Period>
- operator*(
+ __duration__op_mult_2(
             const Rep1& s,
             const duration<Rep2, Period>& d);
 
         template <class Rep1, class Period, class Rep2>
+ constexpr
         duration<typename common_type<Rep1, Rep2>::type, Period>
- operator/(
+ __duration__op_div_2(
             const duration<Rep1, Period>& d,
             const Rep2& s);
 
         template <class Rep1, class Period1, class Rep2, class Period2>
+ constexpr
         typename common_type<Rep1, Rep2>::type
- operator/(
+ __duration__op_div_3(
             const duration<Rep1, Period1>& lhs,
             const duration<Rep2, Period2>& rhs);
 
         #ifdef BOOST_CHRONO_EXTENSIONS
         // Used to get frecuency of events
         template <class Rep1, class Rep2, class Period>
- double operator/(
+ constexpr
+ double __duration__op_div_1(
             const Rep1& s,
             const duration<Rep2, Period>& d);
         #endif
 
         // duration comparisons
         template <class Rep1, class Period1, class Rep2, class Period2>
- constexpr bool operator==(
+ constexpr bool __duration__op_eq_1(
             const duration<Rep1, Period1>& lhs,
             const duration<Rep2, Period2>& rhs);
 
         template <class Rep1, class Period1, class Rep2, class Period2>
- constexpr bool operator!=(
+ constexpr bool __duration__op_neq_1(
             const duration<Rep1, Period1>& lhs,
             const duration<Rep2, Period2>& rhs);
 
         template <class Rep1, class Period1, class Rep2, class Period2>
- constexpr bool operator<(
+ constexpr bool __duration__op_le_1(
             const duration<Rep1, Period1>& lhs,
             const duration<Rep2, Period2>& rhs);
         template <class Rep1, class Period1, class Rep2, class Period2>
- constexpr bool operator<=(
+ constexpr bool __duration__op_leq_1(
             const duration<Rep1, Period1>& lhs,
             const duration<Rep2, Period2>& rhs);
 
         template <class Rep1, class Period1, class Rep2, class Period2>
- constexpr bool operator> (
+ constexpr bool __duration__op_gt_1(
             const duration<Rep1, Period1>& lhs,
             const duration<Rep2, Period2>& rhs);
         template <class Rep1, class Period1, class Rep2, class Period2>
- constexpr bool operator>=(
+ constexpr bool __duration__op_geq_1(
             const duration<Rep1, Period1>& lhs,
             const duration<Rep2, Period2>& rhs);
 
         // duration_cast
 
         template <class ToDuration, class Rep, class Period>
+ constexpr
         ToDuration __duration_cast(const duration<Rep, Period>& d);
 
         // convenience typedefs
         typedef duration<boost::int_least64_t, nano> __nanoseconds; // at least 64 bits needed
         typedef duration<boost::int_least64_t, micro> __microseconds; // at least 55 bits needed
- typedef duration<boost::int_least64_t, milli> __milliseconds__; // at least 45 bits needed
+ typedef duration<boost::int_least64_t, milli> __milliseconds; // at least 45 bits needed
         typedef duration<boost::int_least64_t> __seconds; // at least 35 bits needed
         typedef duration<boost::int_least32_t, ratio< 60> > __minutes; // at least 29 bits needed
         typedef duration<boost::int_least32_t, ratio<3600> > __hours; // at least 23 bits needed
@@ -2222,35 +2633,35 @@
         private:
             rep rep_; // exposition only
         public:
- constexpr duration();
+ constexpr __duration__c_0();
             template <class Rep2>
- constexpr explicit duration(const Rep2& r);
+ constexpr explicit __duration__c_1(const Rep2& r);
 
             template <class Rep2, class Period2>
- constexpr duration(const duration<Rep2, Period2>& d);
+ constexpr __duration__c_2(const duration<Rep2, Period2>& d);
 
             duration& operator=(const duration&) = default;
 
- constexpr rep count() const;
+ constexpr rep __duration__count() const;
 
- constexpr duration operator+();
- constexpr duration operator-();
- duration& operator++();
- duration operator++(int);
- duration& operator--();
- duration operator--(int);
-
- duration& operator+=(const duration& d);
- duration& operator-=(const duration& d);
-
- duration& operator*=(const rep& rhs);
- duration& operator/=(const rep& rhs);
- duration& operator%=(const rep& rhs);
- duration& operator%=(const duration& rhs);
-
- static constexpr duration zero();
- static constexpr duration min();
- static constexpr duration max();
+ constexpr duration __duration__op_plus();
+ constexpr duration __duration__op_minus();
+ duration& __duration__op_pre_inc();
+ duration __duration__op_post_inc(int);
+ duration& __duration__op_pre_dec();
+ duration __duration__op_post_dec(int);
+
+ duration& __duration__op_plus_eq(const duration& d);
+ duration& __duration__op_minus_eq(const duration& d);
+
+ duration& __duration__op_mult_eq=(const rep& rhs);
+ duration& __duration__op_div_eq(const rep& rhs);
+ duration& __duration__op_mod_eq(const rep& rhs);
+ duration& __duration__op_mod_eq2(const duration& rhs);
+
+ static constexpr duration __duration__zero();
+ static constexpr duration __duration__min();
+ static constexpr duration __duration__max();
         };
 
     }}
@@ -2271,6 +2682,14 @@
 
 The following members of __duration do not throw an exception unless the indicated operations on the representations throw an exception.
 
+[section:duration_c_0 Constructor `duration()`]
+
+ constexpr duration();
+
+__effects Constructs an object of type __duration from duration_values<rep>::zero().
+
+[endsect]
+
 [section:duration_c_1 Constructor `duration(const Rep2&)`]
 
     template <class Rep2>
@@ -2316,21 +2735,21 @@
 __returns `rep_`.
 
 [endsect]
-[section:duration_operator_p Member Function `operator+() const`]
+[section:op_unary_plus Member Function `operator+() const`]
 
     constexpr __duration operator+() const;
 
 __returns `*this`.
 
 [endsect]
-[section:duration_operator_m Member Function `operator-() const`]
+[section:op_unary_minus Member Function `operator-() const`]
 
     constexpr __duration operator-() const;
 
 __returns `__duration(-rep_)`.
 
 [endsect]
-[section:duration_operator_pp Member Function `operator++()`]
+[section:op_pre_inc Member Function `operator++()`]
 
     __duration& operator++();
 
@@ -2339,14 +2758,14 @@
 __returns `*this`.
 
 [endsect]
-[section:duration_operator_pp2 Member Function `operator++(int)`]
+[section:op_post_inc Member Function `operator++(int)`]
 
     __duration operator++(int);
 
 __returns `__duration(rep_++)`.
 
 [endsect]
-[section:duration_operator_mm Member Function `operator--()`]
+[section:op_pre_dec Member Function `operator--()`]
 
     __duration& operator--();
 
@@ -2355,14 +2774,14 @@
 __returns `*this`.
 
 [endsect]
-[section:duration_operator_mm2 Member Function `operator--(int)`]
+[section:op_post_dec Member Function `operator--(int)`]
 
     __duration operator--(int);
 
 __returns `__duration(rep_--)`.
 
 [endsect]
-[section:duration_operator_pa Member Function `operator+=(const duration&)`]
+[section:op_plus_eq Member Function `operator+=(const duration&)`]
 
     __duration& operator+=(const __duration& d);
 
@@ -2371,7 +2790,7 @@
 __returns `*this`.
 
 [endsect]
-[section:duration_operator_ma Member Function `operator-=(const duration&)`]
+[section:op_minus_eq Member Function `operator-=(const duration&)`]
 
     __duration& operator-=(const __duration& d);
 
@@ -2380,7 +2799,7 @@
 __returns `*this`.
 
 [endsect]
-[section:duration_operator_moda Member Function `operator%=(const duration&)`]
+[section:op_mod_eq Member Function `operator%=(const duration&)`]
 
     __duration& operator%=(const __duration& d);
 
@@ -2389,7 +2808,7 @@
 __returns `*this`.
 
 [endsect]
-[section:duration_operator_proda Member Function `operator*=(const rep&)`]
+[section:op_mult_eq Member Function `operator*=(const rep&)`]
 
     __duration& operator*=(const rep& rhs);
 
@@ -2398,7 +2817,7 @@
 __returns `*this`.
 
 [endsect]
-[section:duration_operator_da Member Function `operator/=(const rep&)`]
+[section:op_div_eq Member Function `operator/=(const rep&)`]
 
     __duration& operator/=(const rep& rhs);
 
@@ -2407,7 +2826,7 @@
 __returns `*this`.
 
 [endsect]
-[section:duration_operator_moda_2 Member Function `operator%=(const rep&)`]
+[section:op_mod_eq2 Member Function `operator%=(const rep&)`]
 
     __duration& operator%=(const rep& rhs);
 
@@ -2418,21 +2837,21 @@
 [endsect]
 
 
-[section:duration_zero Static Member Function `zero()`]
+[section:zero Static Member Function `zero()`]
 
     static constexpr __duration zero();
 
 __returns `__duration(__duration_values<rep>::zero())`.
 
 [endsect]
-[section:duration_min Static Member Function `min()`]
+[section:min Static Member Function `min()`]
 
     static constexpr __duration min();
 
 __returns `__duration(__duration_values<rep>::min()).`
 
 [endsect]
-[section:duration_max Static Member Function `max()`]
+[section:max Static Member Function `max()`]
 
     static constexpr __duration max();
 
@@ -2443,37 +2862,44 @@
 [endsect]
 
 
-[section `duration` Non-Member Arithmetic]
+[section:arith `duration` Non-Member Arithmetic]
 
-[section:duration_operator_p_1 Non-Member Function `operator+(duration,duration)`]
+[section:duration__op_plus_1 Non-Member Function `operator+(duration,duration)`]
 
     template <class Rep1, class Period1, class Rep2, class Period2>
+ constexpr
     typename __common_type<__duration<Rep1, Period1>, __duration<Rep2, Period2> >::type
     operator+(const __duration<Rep1, Period1>& lhs, const __duration<Rep2, Period2>& rhs);
 
-__returns `CD(lhs) += rhs` where `CD` is the type of the return value.
+__returns `CD(CD(lhs).count() + CD(rhs).count())` where `CD` is the type of the return value.
 
 [endsect]
-[section:duration_operator_m_1 Non-Member Function `operator-(duration,duration)`]
+[section:duration__op_minus_1 Non-Member Function `operator-(duration,duration)`]
 
     template <class Rep1, class Period1, class Rep2, class Period2>
+ constexpr
     typename __common_type<__duration<Rep1, Period1>, __duration<Rep2, Period2> >::type
     operator-(const __duration<Rep1, Period1>& lhs, const __duration<Rep2, Period2>& rhs);
 
-__returns `CD(lhs) -= rhs` where `CD` is the type of the return value.
+__returns `CD(CD(lhs).count() - CD(rhs).count())` where `CD` is the type of the return value.
+
+[endsect]
+[section:duration__op_mult_1 Non-Member Function `operator*(duration,Rep1)`]
 
     template <class Rep1, class Period, class Rep2>
+ constexpr
     __duration<typename __common_type<Rep1, Rep2>::type, Period>
     operator*(const __duration<Rep1, Period>& d, const Rep2& s);
 
 __requires Let `CR` represent the __common_type of `Rep1` and `Rep2`. This function will not participate in overload resolution unless both `Rep1` and `Rep2` are implicitly convertible to `CR`.
 
-__returns `__duration<CR, Period>(d) *= s`.
+__returns `CD(CD(d).count() * s)` where `CD` is the type of the return value.
 
 [endsect]
-[section:duration_operator_prod_1 Non-Member Function `operator*(Rep1,duration)`]
+[section:duration__op_mult_2 Non-Member Function `operator*(Rep1,duration)`]
 
     template <class Rep1, class Period, class Rep2>
+ constexpr
     __duration<typename __common_type<Rep1, Rep2>::type, Period>
     operator*(const Rep1& s, const __duration<Rep2, Period>& d);
 
@@ -2482,80 +2908,92 @@
 __returns `d * s`.
 
 [endsect]
-[section:duration_operator_d_1 Non-Member Function `operator/(duration,Rep2)`]
+
+
+[section:duration__op_div_1 Non-Member Function `operator/(duration,Rep2)`]
 
     template <class Rep1, class Period, class Rep2>
+ constexpr
     __duration<typename __common_type<Rep1, Rep2>::type, Period>
     operator/(const __duration<Rep1, Period>& d, const Rep2& s);
 
 __requires Let `CR` represent the __common_type of `Rep1` and `Rep2`. This function will not participate in overload resolution unless both `Rep1` and `Rep2` are implicitly convertible to `CR`, and `Rep2` is not an instantiation of __duration.
 
-__returns `__duration<CR, Period>(d) /= s`.
+__returns `CD(CD(d).count() / s)` where `CD` is the type of the return value.
 
 [endsect]
-[section:duration_operator_d_2 Non-Member Function `operator/(duration,duration)`]
+[section:duration__op_div_2 Non-Member Function `operator/(duration,duration)`]
 
     template <class Rep1, class Period1, class Rep2, class Period2>
+ constexpr
     typename __common_type<Rep1, Rep2>::type
     operator/(const __duration<Rep1, Period1>& lhs, const __duration<Rep2, Period2>& rhs);
 
-__returns Let `CD` represent the __common_type of the two __duration arguments. Returns `CD(lhs).count() / CD(rhs).count()`.
+__remarks Let `CD` represent the __common_type of the two __duration arguments.
+__returns Returns `CD(lhs).count() / CD(rhs).count()`.
 
 [endsect]
 
-[section:duration_operator_d_3 Non-Member Function `operator/(Rep1,duration)`]
+[section:duration__op_div_3 Non-Member Function `operator/(Rep1,duration)`]
 
 Included only if BOOST_CHRONO_EXTENSIONS is defined.
 
 This overloading could be used to get the frequency of an event counted by `Rep1`.
 
     template <class Rep1, class Rep2, class Period>
+ constexpr
     double operator/(const Rep1& s, const __duration<Rep2, Period>& d);
 
-__remarks Let `CR` represent the __common_type of `Rep1` and `Rep2`. This function will not participate in overload resolution unless both `Rep1` and `Rep2` are implicitly convertible to `CR`, and `Rep1` is not an instantiation of __duration.
+__remarks Let `CR` represent the __common_type of `Rep1` and `Rep2`. This function will not participate in overload resolution unless both `Rep1` and `Rep2` are implicitly convertible to `CR`, and `Rep1` is not an instantiation of __duration. Let `CD` represent __duration<CR,Period>.
+
+__returns `CR(s)/CD(d).count()` where `CD` is the type of the return value.
 
-__returns `CR(s)/__duration<CR, Period>(d).count()`.
 
 [endsect]
 
 
-[section:duration_operator_mod_1 Non-Member Function `operator%(duration,Rep2)`]
+[section:duration__op_mod_1 Non-Member Function `operator%(duration,Rep2)`]
 
   template <class Rep1, class Period, class Rep2>
+ constexpr
   __duration<typename __common_type<Rep1, Rep2>::type, Period>
   operator%(const __duration<Rep1, Period>& d, const Rep2& s);
 
-[*Remarks] This function will not participate in overload resolution unless Rep2 must be implicitly convertible to CR(Rep1, Rep2) and Rep2 must not be an instantiation of __duration.
+__remarks Let `CR` represent the __common_type of `Rep1` and `Rep2`. This function will not participate in overload resolution unless Rep2 must be implicitly convertible to CR and Rep2 must not be an instantiation of __duration.
+
+__returns CD(CD(d).count() % s) where `CD` is the type of the return value.
 
-__returns __duration<CR(Rep1,Rep2), Period>(d) %= s.
 [endsect]
 
-[section:duration_operator_mod_2 Non-Member Function `operator%(duration,duration)`]
+[section:duration__op_mod_2 Non-Member Function `operator%(duration,duration)`]
 
   template <class Rep1, class Period1, class Rep2, class Period2>
+ constexpr
   typename __common_type<__duration<Rep1, Period1>, __duration<Rep2, Period2> >::type
   operator%(const __duration<Rep1, Period1>& lhs,
             const __duration<Rep2, Period2>& rhs);
 
-[*Remarks] This function will not participate in overload resolution unless
+__remarks This function will not participate in overload resolution unless
 
-__returns CD(lhs) %= CD(rhs)
+__returns CD(CD(lhs).count() % CD(rhs).count()) where `CD` is the type of the return value.
 
 [endsect]
 [endsect]
 
-[section `duration` Non-Member Comparaisons]
+[section:cmp `duration` Non-Member Comparaisons]
 
-[section:duration_operator_eq_1 Non-Member Function `operator==(duration,duration)`]
+[section:duration__op_eq_1 Non-Member Function `operator==(duration,duration)`]
 
     template <class Rep1, class Period1, class Rep2, class Period2>
     bool operator==(const __duration<Rep1, Period1>& lhs,
                     const __duration<Rep2, Period2>& rhs);
 
-__returns Let `CD` represent the __common_type of the two __duration arguments. Returns `CD(lhs).count() == CD(rhs).count()`
+__returns Let `CD` represent the __common_type of the two __duration arguments.
+
+__returns Returns `CD(lhs).count() == CD(rhs).count()`
 
 [endsect]
-[section:duration_operator_neq_1 Non-Member Function `operator!=(duration,duration)`]
+[section:duration__op_neq_1 Non-Member Function `operator!=(duration,duration)`]
 
     template <class Rep1, class Period1, class Rep2, class Period2>
     bool operator!=(const __duration<Rep1, Period1>& lhs,
@@ -2564,7 +3002,7 @@
 __returns `!(lhs == rhs)`.
 
 [endsect]
-[section:duration_operator_lt_1 Non-Member Function `operator<(duration,duration)`]
+[section:duration__op_lt_1 Non-Member Function `operator<(duration,duration)`]
 
     template <class Rep1, class Period1, class Rep2, class Period2>
     bool operator< (const __duration<Rep1, Period1>& lhs,
@@ -2573,7 +3011,7 @@
 __returns Let `CD` represent the __common_type of the two __duration arguments. Returns `CD(lhs).count() < CD(rhs).count()`
 
 [endsect]
-[section:duration_operator_leq_1 Non-Member Function `operator<=(duration,duration)`]
+[section:duration__op_leq_1 Non-Member Function `operator<=(duration,duration)`]
 
     template <class Rep1, class Period1, class Rep2, class Period2>
     bool operator<=(const __duration<Rep1, Period1>& lhs,
@@ -2582,7 +3020,7 @@
 __returns `!(rhs < lhs)`.
 
 [endsect]
-[section:duration_operator_gt_1 Non-Member Function `operator>(duration,duration)`]
+[section:duration__op_gt_1 Non-Member Function `operator>(duration,duration)`]
 
     template <class Rep1, class Period1, class Rep2, class Period2>
     bool operator> (const __duration<Rep1, Period1>& lhs,
@@ -2591,7 +3029,7 @@
 __returns `rhs < lhs`.
 
 [endsect]
-[section:duration_operator_gteq_1 Non-Member Function `operator>=(duration,duration)`]
+[section:duration__op_geq_1 Non-Member Function `operator>=(duration,duration)`]
 
     template <class Rep1, class Period1, class Rep2, class Period2>
     bool operator>=(const __duration<Rep1, Period1>& lhs,
@@ -2603,8 +3041,8 @@
 [endsect]
 [section:duration_cast Non-Member Function `duration_cast(duration)`]
 
- template <class ToDuration, class Rep, class Period>
- ToDuration duration_cast(const __duration<Rep, Period>& d);
+ template <class __ToDuration, class Rep, class Period>
+ __ToDuration duration_cast(const __duration<Rep, Period>& d);
 
 __requires This function will not participate in overload resolution unless `ToDuration` is an instantiation of __duration.
 
@@ -2646,7 +3084,8 @@
 
 A clock represents a bundle consisting of a __duration, a __time_point, and a function `now()` to get the current __time_point. A clock must meet the requirements in the following Table.
 
-In this table `C1` and `C2` denote `clock` types. `t1` and `t2` are values returned from `C1::now()` where the call returning `t1` happens before the call returning `t2` and both of these calls happen before `C1::time_point::max()`.
+In this table `C1` and `C2` denote `Clock` types. `t1` and `t2` are values returned from `C1::now()` where the call returning `t1` happens before the call returning `t2` and both of these calls occur before `C1::time_point::max()`.
+(note This means C1 did not wrap around between t1 and t2.).
 
 [table Clock Requirements
     [[expression] [return type] [operational semantics]]
@@ -2658,8 +3097,61 @@
     [[`C1::now()`] [`C1::time_point`] [Returns a __time_point representing the current point in time.]]
 ]
 
+Models of __Clock:
+
+* __system_clock
+* __steady_clock
+* __high_resolution_clock
+* __process_real_cpu_clock
+* __process_user_cpu_clock
+* __process_system_cpu_clock
+* __process_cpu_clock
+* __thread_clock
+
+[endsect]
+
+[section:trivial_clock `TrivialClock` Requirements]
+
+A type `TC` meets the `TrivialClock` requirements if:
+
+* `TC` satisfies the `Clock` requirements,
+* the types `TC::rep`, `TC::duration`, and `TC::time_point` satisfy the requirements of `EqualityComparable`, `LessThanComparable`, `DefaultConstructible`, `CopyConstructible`, `CopyAssignable`, `Destructible`, and the requirements of numeric types.
+
+[note This means, in particular, that operations on these types will not throw exceptions.]
+
+* lvalues of the types `TC::rep`, `TC::duration`, and `TC::time_point` are swappable,
+* the function `TC::now()` does not throw exceptions, and
+* the type `TC::time_point::clock` meets the `TrivialClock` requirements, recursively.
+
+Models of __TrivialClock:
+
+* __system_clock
+* __steady_clock
+* __high_resolution_clock
+* __process_real_cpu_clock
+* __process_user_cpu_clock
+* __process_system_cpu_clock
+* __thread_clock
+
+[endsect]
+
+[section:ecclock `EcClock` Requirements]
+
+A type `EcC` meets the `EcClock` requirements if
+
+* `TC` satisfies the `TrivialClock ` requirements, and
+* it add `now()` interfaces allowing to recover internal error codes as described in the following table.
 
-Models of Clock:
+In this table `C1` denotes a `EcClock` type and `ec` is an instance of a `boost::system::error_code`.
+
+[table Clock Requirements
+ [[expression] [return type] [operational semantics]]
+ [[`C1::now(ec)`] [`C1::time_point`] [Returns a __time_point representing the current point in time. `ec` will stores the error-code in case something was wrong internally.]]
+ [[`C1::now(boost::throws())`] [`C1::time_point`] [Returns a __time_point representing the current point in time.
+ Throws a `boost::system::system_error` exception in case something was wrong internally.]]
+]
+
+Models of __Clock:
 
 * __system_clock
 * __steady_clock
@@ -2667,10 +3159,12 @@
 * __process_real_cpu_clock
 * __process_user_cpu_clock
 * __process_system_cpu_clock
+* __process_cpu_clock
 * __thread_clock
 
 [endsect]
 
+
 [/=============================================]
 [section:time_point_hpp Header `<boost/chrono/time_point.hpp>`]
 [/=============================================]
@@ -2680,56 +3174,67 @@
     namespace boost {
       namespace chrono {
 
- template <class Clock, class Duration = typename Clock::duration> class __time_point;
+ template <class __Clock, class __Duration = typename Clock::duration>
+ class __time_point;
 
       }
- template <class Clock, class Duration1, class Duration2>
+ template <class __Clock, class __Duration1, class __Duration2>
       struct __common_type_spe<time_point<Clock, Duration1>,
                          time_point<Clock, Duration2> >;
 
       namespace chrono {
 
         // time_point arithmetic
- template <class Clock, class Duration1, class Rep2, class Period2>
- time_point<Clock, typename common_type<Duration1, duration<Rep2, Period2> >::type>
- operator+(const time_point<Clock, Duration1>& lhs, const duration<Rep2, Period2>& rhs);
-
- template <class Rep1, class Period1, class Clock, class Duration2>
- time_point<Clock, typename common_type<duration<Rep1, Period1>, Duration2>::type>
- operator+(const duration<Rep1, Period1>& lhs, const time_point<Clock, Duration2>& rhs);
-
- template <class Clock, class Duration1, class Rep2, class Period2>
- time_point<Clock, typename common_type<Duration1, duration<Rep2, Period2> >::type>
- operator-(const time_point<Clock, Duration1>& lhs, const duration<Rep2, Period2>& rhs);
-
- template <class Clock, class Duration1, class Duration2>
- typename common_type<Duration1, Duration2>::type
- operator-(const time_point<Clock, Duration1>& lhs, const time_point<Clock,
- Duration2>& rhs);
+ template <class __Clock, class __Duration1, class Rep2, class Period2>
+ constexpr time_point<Clock, typename common_type<Duration1, duration<Rep2, Period2> >::type>
+ __time_point__op_plus_1(const time_point<Clock, Duration1>& lhs,
+ const duration<Rep2, Period2>& rhs);
+
+ template <class Rep1, class Period1, class __Clock, class __Duration2>
+ constexpr time_point<Clock, typename common_type<duration<Rep1, Period1>, Duration2>::type>
+ __time_point__op_plus_2(const duration<Rep1, Period1>& lhs,
+ const time_point<Clock, Duration2>& rhs);
+
+ template <class __Clock, class __Duration1, class Rep2, class Period2>
+ constexpr time_point<Clock, typename common_type<Duration1, duration<Rep2, Period2> >::type>
+ __time_point__op_minus_1(const time_point<Clock, Duration1>& lhs,
+ const duration<Rep2, Period2>& rhs);
+
+ template <class __Clock, class __Duration1, class __Duration2>
+ constexpr typename common_type<Duration1, Duration2>::type
+ __time_point__op_minus_2(const time_point<Clock, Duration1>& lhs,
+ const time_point<Clock, Duration2>& rhs);
 
         // time_point comparisons
- template <class Clock, class Duration1, class Duration2>
- constexpr bool operator==(const time_point<Clock, Duration1>& lhs,
- const time_point<Clock, Duration2>& rhs);
- template <class Clock, class Duration1, class Duration2>
- constexpr bool operator!=(const time_point<Clock, Duration1>& lhs,
- const time_point<Clock, Duration2>& rhs);
- template <class Clock, class Duration1, class Duration2>
- constexpr bool operator< (const time_point<Clock, Duration1>& lhs,
- const time_point<Clock, Duration2>& rhs);
- template <class Clock, class Duration1, class Duration2>
- constexpr bool operator<=(const time_point<Clock, Duration1>& lhs,
- const time_point<Clock, Duration2>& rhs);
- template <class Clock, class Duration1, class Duration2>
- constexpr bool operator> (const time_point<Clock, Duration1>& lhs,
- const time_point<Clock, Duration2>& rhs);
- template <class Clock, class Duration1, class Duration2>
- constexpr bool operator>=(const time_point<Clock, Duration1>& lhs,
- const time_point<Clock, Duration2>& rhs);
+ template <class __Clock, class __Duration1, class __Duration2>
+ constexpr bool
+ __time_point__op_eq(const time_point<Clock, Duration1>& lhs,
+ const time_point<Clock, Duration2>& rhs);
+ template <class __Clock, class __Duration1, class __Duration2>
+ constexpr bool
+ __time_point__op_neq(const time_point<Clock, Duration1>& lhs,
+ const time_point<Clock, Duration2>& rhs);
+ template <class __Clock, class __Duration1, class __Duration2>
+ constexpr bool
+ __time_point__op_lt(const time_point<Clock, Duration1>& lhs,
+ const time_point<Clock, Duration2>& rhs);
+ template <class __Clock, class __Duration1, class __Duration2>
+ constexpr bool
+ __time_point__op_leq(const time_point<Clock, Duration1>& lhs,
+ const time_point<Clock, Duration2>& rhs);
+ template <class __Clock, class __Duration1, class __Duration2>
+ constexpr bool
+ __time_point__op_gt(const time_point<Clock, Duration1>& lhs,
+ const time_point<Clock, Duration2>& rhs);
+ template <class __Clock, class __Duration1, class __Duration2>
+ constexpr bool
+ __time_point__op_geq(const time_point<Clock, Duration1>& lhs,
+ const time_point<Clock, Duration2>& rhs);
 
         // time_point_cast
- template <class ToDuration, class Clock, class Duration>
- constexpr time_point<Clock, ToDuration> __time_point_cast(const time_point<Clock, Duration>& t);
+ template <class __ToDuration, class __Clock, class __Duration>
+ constexpr time_point<Clock, ToDuration>
+ __time_point_cast(const time_point<Clock, Duration>& t);
 
       }
     }
@@ -2737,13 +3242,13 @@
 
 [section:common_type_spe2 `common_type` specialization]
 
- template <class Clock, class Duration1, class Duration2>
- struct __common_type<chrono::__time_point<Clock, Duration1>, chrono::__time_point<Clock, Duration2> >
+ template <class __Clock, class __Duration1, class __Duration2>
+ struct __common_type<chrono::__time_point<__Clock, __Duration1>, chrono::__time_point<__Clock, __Duration2> >
     {
- typedef chrono::__time_point<Clock, typename __common_type<Duration1, Duration2>::type> type;
+ typedef chrono::__time_point<__Clock, typename __common_type<Duration1, __Duration2>::type> type;
     };
 
-The __common_type of two __time_points is a __time_point with the same `clock` (both have the same `clock`), and the __common_type of the two __durations.
+The __common_type of two __time_points is a __time_point with the same __Clock (both have the same __Clock), and the __common_type of the two __durations.
 
 [endsect]
 
@@ -2751,7 +3256,7 @@
 
 A __time_point represents a point in time with respect to a specific clock.
 
- template <class Clock, class Duration>
+ template <class __Clock, class __Duration>
     class time_point {
     public:
         typedef Clock clock;
@@ -2761,38 +3266,39 @@
     private:
         duration d_; // exposition only
     public:
- constexpr time_point();
- constexpr explicit time_point(const duration& d);
+ constexpr __time_point__c_1();
+
+ constexpr explicit __time_point__c_2(const duration& d);
 
         // conversions
- template <class Duration2>
- time_point(const time_point<clock, Duration2>& t);
+ template <class __Duration2>
+ constexpr
+ __time_point__c_3(const time_point<clock, __Duration2>& t);
 
         // observer
-
- constexpr duration time_since_epoch() const;
+ constexpr duration __time_point__time_since_epoch() const;
 
         // arithmetic
 
- #ifdef BOOST_CHRONO_EXTENSIONS
- constexpr time_point operator+();
- constexpr time_point operator-();
- time_point& operator++();
- time_point operator++(int);
- time_point& operator--();
- time_point operator--(int);
+ #ifdef BOOST_CHRONO_EXTENSIONS
+ constexpr time_point __time_point__op_unary_plus();
+ constexpr time_point __time_point__op_unary_minus();
+ time_point& __time_point__op_pre_inc();
+ time_point __time_point__op_post_inc(int);
+ time_point& __time_point__op_pre_dec();
+ time_point __time_point__op_post_dec(int);
 
- time_point& operator+=(const rep& d);
- time_point& operator-=(const rep& d);
+ time_point& __time_point__op_plus_eq_1(const rep& d);
+ time_point& __time_point__op_minus_eq_1(const rep& d);
         #endif
 
- time_point& operator+=(const duration& d);
- time_point& operator-=(const duration& d);
+ time_point& __time_point__op_plus_eq_2(const duration& d);
+ time_point& __time_point__op_minus_eq_2(const duration& d);
 
         // special values
 
- static constexpr time_point min();
- static constexpr time_point max();
+ static constexpr time_point __time_point__min();
+ static constexpr time_point __time_point__max();
     };
 
 Clock must meet the __clock_req.
@@ -2815,7 +3321,9 @@
 [endsect]
 [section:time_point_c_3 Copy Constructor `time_point(const time_point&)`]
 
- template <class Duration2> time_point(const __time_point<clock, Duration2>& t);
+ template <class __Duration2>
+ constexpr
+ time_point(const __time_point<clock, __Duration2>& t);
 
 __requires This function will not participate in overload resolution unless `Duration2` is implicitly convertible to __duration.
 
@@ -2831,21 +3339,21 @@
 
 [endsect]
 
-[section:operator_p Member Function `operator+() const`]
+[section:op_unary_plus Member Function `operator+() const`]
 
     constexpr __time_point operator+() const;
 
 __returns `*this`.
 
 [endsect]
-[section:operator_m Member Function `operator-() const`]
+[section:op_unary_minus Member Function `operator-() const`]
 
     constexpr __time_point operator-() const;
 
 __returns `__time_point(-d_)`.
 
 [endsect]
-[section:operator_pp Member Function `operator++()`]
+[section:op_pre_inc Member Function `operator++()`]
 
     __time_point& operator++();
 
@@ -2854,14 +3362,14 @@
 __returns `*this`.
 
 [endsect]
-[section:operator_pp2 Member Function `operator++(int)`]
+[section:op_post_inc Member Function `operator++(int)`]
 
     __time_point operator++(int);
 
 __returns `__time_point(d_++)`.
 
 [endsect]
-[section:operator_mm Member Function `operator--()`]
+[section:op_pre_dec Member Function `operator--()`]
 
     __time_point& operator--();
 
@@ -2870,7 +3378,7 @@
 __returns `*this`.
 
 [endsect]
-[section:operator_mm2 Member Function `operator--(int)`]
+[section:op_post_dec Member Function `operator--(int)`]
 
     __time_point operator--(int);
 
@@ -2878,7 +3386,7 @@
 
 [endsect]
 
-[section:time_point_operator_per Member Function `operator+=`]
+[section:op_plus_eq_1 Member Function `operator+=(const rep&)`]
 
     __time_point& operator+=(const rep& r);
 
@@ -2887,7 +3395,7 @@
 __returns `*this`.
 
 [endsect]
-[section:time_point_operator_mer Member Function `operator-=`]
+[section:op_minus_eq_1 Member Function `operator-=(const rep&)`]
 
     __time_point& operator-=(const rep& r);
 
@@ -2898,7 +3406,7 @@
 [endsect]
 
 
-[section:time_point_operator_pe Member Function `operator+=`]
+[section:op_plus_eq_2 Member Function `operator+=`]
 
     time_point& operator+=(const duration& d);
 
@@ -2907,7 +3415,7 @@
 __returns `*this`.
 
 [endsect]
-[section:time_point_operator_me Member Function `operator-=`]
+[section:op_minus_eq_2 Member Function `operator-=`]
 
     time_point& operator-=(const duration& d);
 
@@ -2916,14 +3424,14 @@
 __returns `*this`.
 
 [endsect]
-[section:time_point_min Static Member Function `min`]
+[section:min Static Member Function `min`]
 
     static constexpr time_point min();
 
 __returns `time_point(duration::min())`.
 
 [endsect]
-[section:time_point_max Static Member Function `max`]
+[section:max Static Member Function `max`]
 
     static constexpr time_point max();
 
@@ -2933,102 +3441,112 @@
 [endsect]
 
 
-[section `time_point` non-member arithmetic]
+[section:arith `time_point` non-member arithmetic]
 
 
-[section:time_point_operator_p_1 Non-Member Function `operator+(time_point,duration)`]
+[section:time_point__op_plus_1 Non-Member Function `operator+(time_point,duration)`]
 
- template <class Clock, class Duration1, class Rep2, class Period2>
- __time_point<Clock, typename __common_type<Duration1, duration<Rep2, Period2> >::type>
- operator+(const __time_point<Clock, Duration1>& lhs,
+ template <class __Clock, class __Duration1, class Rep2, class Period2>
+ constexpr
+ __time_point<__Clock, typename __common_type<Duration1, duration<Rep2, Period2> >::type>
+ operator+(const __time_point<__Clock, __Duration1>& lhs,
               const duration<Rep2, Period2>& rhs);
 
-__returns `CT(lhs) += rhs` where `CT` is the type of the return value.
+__returns `CT(lhs.time_since_epoch() + rhs)` where `CT` is the type of the return value.
 
 [endsect]
-[section:time_point_operator_p_2 Non-Member Function `operator+(duration,time_point)`]
+[section:time_point__op_plus_2 Non-Member Function `operator+(duration,time_point)`]
 
- template <class Rep1, class Period1, class Clock, class Duration2>
- __time_point<Clock, typename __common_type<duration<Rep1, Period1>, Duration2>::type>
+ template <class Rep1, class Period1, class __Clock, class __Duration2>
+ constexpr
+ __time_point<__Clock, typename __common_type<duration<Rep1, Period1>, __Duration2>::type>
     operator+(const duration<Rep1, Period1>& lhs,
- const __time_point<Clock, Duration2>& rhs);
+ const __time_point<__Clock, __Duration2>& rhs);
 
 __returns `rhs + lhs`.
 
 [endsect]
-[section:time_point_operator_m_1 Non-Member Function `operator-(time_point,duration)`]
+[section:time_point__op_minus_1 Non-Member Function `operator-(time_point,duration)`]
 
- template <class Clock, class Duration1, class Rep2, class Period2>
- __time_point<Clock, typename __common_type<Duration1, duration<Rep2, Period2> >::type>
- operator-(const __time_point<Clock, Duration1>& lhs,
+ template <class __Clock, class __Duration1, class Rep2, class Period2>
+ constexpr
+ __time_point<__Clock, typename __common_type<Duration1, duration<Rep2, Period2> >::type>
+ operator-(const __time_point<__Clock, __Duration1>& lhs,
               const duration<Rep2, Period2>& rhs);
 
 __returns `lhs + (-rhs)`.
 
 [endsect]
-[section:time_point_operator_m_2 Non-Member Function `operator-(time_point,time_point)`]
+[section:time_point__op_minus_2 Non-Member Function `operator-(time_point,time_point)`]
 
- template <class Clock, class Duration1, class Duration2>
- typename __common_type<Duration1, Duration2>::type
- operator-(const __time_point<Clock, Duration1>& lhs,
- const __time_point<Clock, Duration2>& rhs);
+ template <class __Clock, class __Duration1, class __Duration2>
+ constexpr
+ typename __common_type<Duration1, __Duration2>::type
+ operator-(const __time_point<__Clock, __Duration1>& lhs,
+ const __time_point<__Clock, __Duration2>& rhs);
 
 __returns `lhs.time_since_epoch() - rhs.time_since_epoch()`.
 
 [endsect]
 [endsect]
 
-[section `time_point` non-member comparisons]
-[section:time_point_operator_eq Non-Member Function `operator==(time_point,time_point)`]
+[section:cmp `time_point` non-member comparisons]
+[section:time_point__op_eq Non-Member Function `operator==(time_point,time_point)`]
 
- template <class Clock, class Duration1, class Duration2>
- bool operator==(const __time_point<Clock, Duration1>& lhs,
- const __time_point<Clock, Duration2>& rhs);
+ template <class __Clock, class __Duration1, class __Duration2>
+ constexpr
+ bool operator==(const __time_point<__Clock, __Duration1>& lhs,
+ const __time_point<__Clock, __Duration2>& rhs);
 
 __returns `lhs.time_since_epoch() == rhs.time_since_epoch()`.
 
 [endsect]
-[section:time_point_operator_neq Non-Member Function `operator!=(time_point,time_point)`]
+[section:time_point__op_neq Non-Member Function `operator!=(time_point,time_point)`]
 
-template <class Clock, class Duration1, class Duration2>
- bool operator!=(const __time_point<Clock, Duration1>& lhs,
- const __time_point<Clock, Duration2>& rhs);
+ template <class __Clock, class __Duration1, class __Duration2>
+ constexpr
+ bool operator!=(const __time_point<__Clock, __Duration1>& lhs,
+ const __time_point<__Clock, __Duration2>& rhs);
 
 __returns `!(lhs == rhs)`.
 
 [endsect]
-[section:time_point_operator_lt Non-Member Function `operator<(time_point,time_point)`]
+[section:time_point__op_lt Non-Member Function `operator<(time_point,time_point)`]
 
- template <class Clock, class Duration1, class Duration2>
- bool operator< (const __time_point<Clock, Duration1>& lhs,
- const __time_point<Clock, Duration2>& rhs);
+ template <class __Clock, class __Duration1, class __Duration2>
+ constexpr
+ bool operator< (const __time_point<__Clock, __Duration1>& lhs,
+ const __time_point<__Clock, __Duration2>& rhs);
 
 __returns lhs.time_since_epoch() < rhs.time_since_epoch().
 
 [endsect]
-[section:time_point_operator_leq Non-Member Function `operator<=(time_point,time_point)`]
+[section:time_point__op_leq Non-Member Function `operator<=(time_point,time_point)`]
 
- template <class Clock, class Duration1, class Duration2>
- bool operator<=(const __time_point<Clock, Duration1>& lhs,
- const __time_point<Clock, Duration2>& rhs);
+ template <class __Clock, class __Duration1, class __Duration2>
+ constexpr
+ bool operator<=(const __time_point<__Clock, __Duration1>& lhs,
+ const __time_point<__Clock, __Duration2>& rhs);
 
 __returns `!(rhs < lhs)`.
 
 [endsect]
-[section:time_point_operator_gt Non-Member Function `operator>(time_point,time_point)`]
+[section:time_point__op_gt Non-Member Function `operator>(time_point,time_point)`]
 
-template <class Clock, class Duration1, class Duration2>
- bool operator>(const __time_point<Clock, Duration1>& lhs,
- const __time_point<Clock, Duration2>& rhs);
+ template <class __Clock, class __Duration1, class __Duration2>
+ constexpr
+ bool operator>(const __time_point<__Clock, __Duration1>& lhs,
+ const __time_point<__Clock, __Duration2>& rhs);
 
 __returns `rhs < lhs`.
 
 [endsect]
-[section:time_point_operator_geq Non-Member Function `operator>=(time_point,time_point)`]
+[section:time_point__op_geq Non-Member Function `operator>=(time_point,time_point)`]
 
- template <class Clock, class Duration1, class Duration2>
- bool operator>=(const __time_point<Clock, Duration1>& lhs,
- const __time_point<Clock, Duration2>& rhs);
+ template <class __Clock, class __Duration1, class __Duration2>
+ constexpr
+ bool operator>=(const __time_point<__Clock, __Duration1>& lhs,
+ const __time_point<__Clock, __Duration2>& rhs);
 
 __returns `!(lhs < rhs)`.
 
@@ -3038,12 +3556,13 @@
 
 [section:time_point_cast Non-Member Function `time_point_cast(time_point)`]
 
- template <class ToDuration, class Clock, class Duration>
- __time_point<Clock, ToDuration> __time_point_cast(const __time_point<Clock, Duration>& t);
+ template <class __ToDuration, class __Clock, class __Duration>
+ constexpr
+ __time_point<__Clock, ToDuration> __time_point_cast(const __time_point<__Clock, __Duration>& t);
 
 __requires This function will not participate in overload resolution unless `ToDuration` is an instantiation of __duration.
 
-__returns `__time_point<Clock, ToDuration>(__duration_cast<ToDuration>(t.time_since_epoch()))`.
+__returns `__time_point<__Clock, ToDuration>(__duration_cast<ToDuration>(t.time_since_epoch()))`.
 
 [endsect]
 
@@ -3053,7 +3572,7 @@
 [section:system_clocks_hpp Header `<boost/chrono/system_clocks.hpp>`]
 [/=============================================]
 
-This file contains the standard clock classes.
+This file contains the standard clock classes. The types defined in this section satisfy the __TrivialClock requirements
 
     namespace boost {
       namespace chrono {
@@ -3063,6 +3582,11 @@
         class __steady_clock;
         class __high_resolution_clock;
 
+ template <class CharT>
+ struct clock_string<system_clock, CharT>;
+ template <class CharT>
+ struct clock_string<steady_clock, CharT>;
+
       }
     }
 
@@ -3085,32 +3609,33 @@
         typedef chrono::__time_point<system_clock> time_point;
         static constexpr bool is_steady = false;
 
- static time_point now(); // throws on error
- static time_point now(system::error_code & ec); // never throws
+
+ static time_point now() noexcept;
+ static time_point now(system::error_code & ec);
 
         // Map to C API
- static std::time_t to_time_t(const time_point& t);
- static time_point from_time_t(std::time_t t);
+ static std::time_t to_time_t(const time_point& t) noexcept;
+ static time_point from_time_t(std::time_t t) noexcept;
     };
 
 __system_clock satisfy the __clock_req:
 
 * `system_clock::duration::min() < system_clock::duration::zero()` is `true`.
 
-* The nested duration typedef has a resolution that depends on the one provided by the platform.
+* The nested `duration` typedef has a resolution that depends on the one provided by the platform.
 
 [section:to_time_t Static Member Function `to_time_t(time_point)`]
 
-time_t to_time_t(const time_point& t);
+ time_t to_time_t(const time_point& t) noexcept;
 
-__returns A `time_t` such that the `time_t` and `t` represent the same point in time, truncated to the courser of the precisions among `time_t` and `t`.
+__returns A `time_t` such that the `time_t` and `t` represent the same point in time, truncated to the coarser of the precisions among `time_t` and `time_point`.
 
 [endsect]
 [section:from_time_t Static Member Function `from_time_t(time_t)`]
 
- time_point from_time_t(time_t t);
+ time_point from_time_t(time_t t) noexcept;
 
-__returns A __time_point such that the __time_point and `t` represent the same point in time, truncated to the coarser of the precisions among __time_point and `t`.
+__returns A __time_point such that the __time_point and `t` represent the same point in time, truncated to the coarser of the precisions among __time_point and `time_t`.
 
 [endsect]
 [endsect]
@@ -3133,16 +3658,14 @@
             typedef __nanoseconds duration;
             typedef duration::rep rep;
             typedef duration::period period;
- typedef chrono::__time_point<steady_clock> time_point;
+ typedef chrono::__time_point<steady_clock> time_point;
             static constexpr bool is_steady = true;
 
- static time_point now(); // throws on error
- static time_point now(system::error_code & ec); // never throws
+ static time_point now() noexcept;
+ static time_point now(system::error_code & ec);
         };
     #endif
 
-
-
 [endsect]
 
 [section:high_resolution_clock Class `high_resolution_clock`]
@@ -3157,6 +3680,40 @@
 
 [endsect]
 
+[section:clock_string_system_clock `clock_string<system_clock>` Specialization]
+
+ template <class CharT>
+ struct clock_string<system_clock, CharT>
+ {
+ static std::basic_string<CharT> name();
+ static std::basic_string<CharT> since();
+ };
+
+`clock_string<>::name()` returns "system_clock".
+
+`clock_string<>::since()` returns " since Jan 1, 1970"
+
+
+[endsect]
+
+[section:clock_string_steady_clock `clock_string<steady_clock>` Specialization]
+
+ #ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
+
+ template <class CharT>
+ struct clock_string<steady_clock, CharT>
+ {
+ static std::basic_string<CharT> name();
+ static std::basic_string<CharT> since();
+ };
+ #endif
+
+`clock_string<>::name()` returns "steady_clock".
+
+`clock_string<>::since()` returns " since boot"
+
+[endsect]
+
 [endsect]
 
 [/=============================================]
@@ -3443,42 +4000,100 @@
 [endsect]
 [endsect]
 
-[section:other_clocks Other Clocks]
 
+[section:round Chrono Rounding Utilities]
 [/==================================================================]
-[section:process_cpu_clocks_hpp Header `<boost/chrono/process_cpu_clocks.hpp>`]
+[section:floor_hpp Header `<boost/chrono/floor.hpp>`]
 [/==================================================================]
 
-Knowing how long a program takes to execute is useful in both test and production environments. It is also helpful if such timing information is broken down into real (wall clock) time, CPU time spent by the user, and CPU time spent by the operating system servicing user requests.
+ namespace boost { namespace chrono {
+ template <class To, class Rep, class Period>
+ To floor(const duration<Rep, Period>& d);
+ } }
 
-Process clocks don't include the time spent by the child process.
+This function round down the given parameter.
 
- namespace boost { namespace chrono {
+[endsect]
+[/==================================================================]
+[section:round_hpp Header `<boost/chrono/round.hpp>`]
+[/==================================================================]
 
- class process_real_cpu_clock;
- class process_user_cpu_clock;
- class process_system_cpu_clock;
- class process_cpu_clock;
+ namespace boost { namespace chrono {
+ template <class To, class Rep, class Period>
+ To round(const duration<Rep, Period>& d);
+ } }
 
- struct process_cpu_clock::times;
- template <class CharT, class Traits>
+This function round to nearest, to even on tie the given parameter.
+
+
+[endsect]
+[/==================================================================]
+[section:ceil_hpp Header `<boost/chrono/ceil.hpp>`]
+[/==================================================================]
+
+ namespace boost { namespace chrono {
+ template <class To, class Rep, class Period>
+ To ceil(const duration<Rep, Period>& d);
+ } }
+
+This function round up the given parameter.
+
+[endsect]
+[endsect]
+
+
+[section:other_clocks Other Clocks]
+
+[/==================================================================]
+[section:process_cpu_clocks_hpp Header `<boost/chrono/process_cpu_clocks.hpp>`]
+[/==================================================================]
+
+Knowing how long a program takes to execute is useful in both test and production environments. It is also helpful if such timing information is broken down into real (wall clock) time, CPU time spent by the user, and CPU time spent by the operating system servicing user requests.
+
+Process clocks don't include the time spent by the child process.
+
+ #define BOOST_CHRONO_HAS_PROCESS_CLOCKS
+
+ namespace boost { namespace chrono {
+
+ class process_real_cpu_clock;
+ class process_user_cpu_clock;
+ class process_system_cpu_clock;
+ class process_cpu_clock;
+
+ template <typename Rep>
+ struct process_times;
+ template <class CharT, class Traits, class Rep>
         std::basic_ostream<CharT, Traits>&
         operator<<(std::basic_ostream<CharT, Traits>& os,
- process_cpu_clock::times const& rhs);
+ process_times<Rep> const& rhs);
 
- template <class CharT, class Traits>
+ template <class CharT, class Traits, class Rep>
         std::basic_istream<CharT, Traits>&
         operator>>(std::basic_istream<CharT, Traits>& is,
- process_cpu_clock::times const& rhs);
+ process_times<Rep> const& rhs);
+
+ template <class Rep>
+ struct duration_values<process_times<Rep> >;
+
+ template <class CharT>
+ struct clock_string<process_real_cpu_clock, CharT>;
+ struct clock_string<process_user_cpu_clock, CharT>;
+ struct clock_string<process_system_cpu_clock, CharT>;
+ struct clock_string<process_cpu_clock, CharT>;
 
- template <>
- struct duration_values<process_cpu_clock::times>;
     } }
     namespace std {
- template <>
- class numeric_limits<boost::chrono::process_cpu_clock::times>;
+ template <class Rep>
+ class numeric_limits<boost::chrono::process_times<Rep> >;
     }
 
+[section: BOOST_CHRONO_HAS_PROCESS_CLOCKS Macro `BOOST_CHRONO_HAS_PROCESS_CLOCKS `]
+
+This macro is defined if the platform supports process clocks.
+
+[endsect]
+
 [section:process_real_cpu_clock Class `process_real_cpu_clock`]
 
 __process_real_cpu_clock satisfy the __clock_req.
@@ -3493,7 +4108,8 @@
             typedef chrono::__time_point<process_real_cpu_clock> time_point;
             static constexpr bool is_steady = true;
 
- static time_point now( system::error_code & ec = system::throws );
+ static time_point now( ) noexcept;
+ static time_point now( system::error_code & ec );
         };
 
 
@@ -3512,7 +4128,8 @@
             typedef chrono::__time_point<process_user_cpu_clock> time_point;
             static constexpr bool is_steady = true;
 
- static time_point now( system::error_code & ec = system::throws );
+ static time_point now( ) noexcept;
+ static time_point now( system::error_code & ec );
         };
 
 
@@ -3532,7 +4149,8 @@
             typedef chrono::__time_point<process_system_cpu_clock> time_point;
             static constexpr bool is_steady = true;
 
- static time_point now( system::error_code & ec = system::throws );
+ static time_point now( ) noexcept;
+ static time_point now( system::error_code & ec );
         };
 
 
@@ -3549,7 +4167,7 @@
     class process_cpu_clock
     {
     public:
- struct times ;
+ typedef process_times<nanoseconds::rep> times ;
 
         typedef __duration<times, nano> duration;
         typedef duration::rep rep;
@@ -3557,22 +4175,24 @@
         typedef chrono::__time_point<process_cpu_clock> time_point;
         static constexpr bool is_steady = true;
 
- static time_point now( system::error_code & ec = system::throws );
+ static time_point now( ) noexcept;
+ static time_point now( system::error_code & ec );
     };
 
 [endsect]
 
-[section:times Class `process_cpu_clock::times`]
+[section:times Template Class `process_times`]
 
 This class is the representation of the `process_cpu_clock::duration` class. As such it needs to implements the arithmetic operators.
 
- struct times : arithmetic<times,
- multiplicative<times, process_real_cpu_clock::rep,
- less_than_comparable<times> > >
+ template <typename Rep>
+ struct process_times : arithmetic<process_times<Rep>,
+ multiplicative<process_times<Rep>, Rep,
+ less_than_comparable<process_times<Rep> > > >
         {
- process_real_cpu_clock::rep real; // real (i.e wall clock) time
- process_user_cpu_clock::rep user; // user cpu time
- process_system_cpu_clock::rep system; // system cpu time
+ Rep real; // real (i.e wall clock) time
+ Rep user; // user cpu time
+ Rep system; // system cpu time
 
             times();
             times(
@@ -3580,64 +4200,138 @@
                 process_user_cpu_clock::rep u,
                 process_system_cpu_clock::rep s);
 
- bool operator==(times const& rhs);
-
- times operator+=(times const& rhs);
- times operator-=(times const& rhs);
- times operator*=(times const& rhs);
- times operator/=(times const& rhs);
- bool operator<(times const & rhs) const;
+ template <typename Rep2>
+ explicit process_times(
+ Rep2 r);
+ template <typename Rep2>
+ explicit process_times(
+ process_times<Rep2> const& rhs);
+ operator rep() const;
+
+ bool operator==(process_times const& rhs);
+ template <typename Rep2>
+ bool operator==(process_times<Rep2> const& rhs);
+
+ times operator+=(process_times const& rhs);
+ times operator-=(process_times const& rhs);
+ times operator*=(process_times const& rhs);
+ times operator/=(process_times const& rhs);
+ bool operator<(process_times const & rhs) const;
         };
 
 [endsect]
 
-[section:times_io `process_cpu_clock::times` Input/Output]
+[section:times_io `process_times` Input/Output]
 
- template <class CharT, class Traits>
+ template <class CharT, class Traits, class Rep>
     std::basic_ostream<CharT, Traits>&
     operator<<(std::basic_ostream<CharT, Traits>& os,
- process_cpu_clock::times const& rhs);
+ process_times<Rep> const& rhs);
 
-[*Effect]: Output each part separated by ';' and sourrounded by '{', '}'.
-[*Throws]: None.
+__effects Output each part separated by ';' and sourrounded by '{', '}'.
 
- template <class CharT, class Traits>
+__throws None.
+
+ template <class CharT, class Traits, class Rep>
     std::basic_istream<CharT, Traits>&
     operator>>(std::basic_istream<CharT, Traits>& is,
- process_cpu_clock::times const& rhs);
+ process_times<Rep> const& rhs);
+
+__effects overrides the value of rhs if the input stream has the format "{r;u;s}". Otherwise, set the input stream state as failbit | eofbit.
 
-[*Effect]: overrides the value of rhs if the input stream has the format "{r;u;s}". Otherwise, set the input stream state as failbit | eofbit.
-[*Throws]: None.
+__throws None.
 
 
 [endsect]
 
-[section:times_duration_values `duration_values` Specialization for `times`]
+[section:times_duration_values `duration_values` Specialization for `process_times<>`]
 
- template <>
- struct __duration_values<process_cpu_clock::times>
+ template <class Rep>
+ struct __duration_values<process_times<Rep> >
     {
- static process_cpu_clock::times zero();
- static process_cpu_clock::times max();
- static process_cpu_clock::times min();
+ static process_times<Rep> zero();
+ static process_times<Rep> max();
+ static process_times<Rep> min();
     };
 
 The `times` specific functions `zero()`, `max()` and `min()` uses the relative functions on the representation of each component.
 
 [endsect]
 
-[section:times_numeric_limits `numeric_limits` Specialization for `times`]
+[section:clock_string_process_real_cpu_clock `clock_string<process_real_cpu_clock>` Specialization]
+
+ template <class CharT>
+ struct clock_string<process_real_cpu_clock, CharT>
+ {
+ static std::basic_string<CharT> name();
+ static std::basic_string<CharT> since();
+ };
+
+`clock_string<>::name()` returns "process_real_cpu_clock".
+
+`clock_string<>::since()` returns " since process start-up"
+
+[endsect]
+
+[section:clock_string_process_user_cpu_clock `clock_string<process_user_cpu_clock>` Specialization]
+
+ template <class CharT>
+ struct clock_string<process_user_cpu_clock, CharT>
+ {
+ static std::basic_string<CharT> name();
+ static std::basic_string<CharT> since();
+ };
+
+`clock_string<>::name()` returns "process_user_cpu_clock".
+
+`clock_string<>::since()` returns " since process start-up"
+
+
+[endsect]
+
+[section:clock_string_process_system_cpu_clock `clock_string<process_system_cpu_clock>` Specialization]
+
+ template <class CharT>
+ struct clock_string<process_system_cpu_clock, CharT>
+ {
+ static std::basic_string<CharT> name();
+ static std::basic_string<CharT> since();
+ };
+
+`clock_string<>::name()` returns "process_system_cpu_clock".
+
+`clock_string<>::since()` returns " since process start-up"
+
+
+[endsect]
+
+[section:clock_string_process_cpu_clock `clock_string<process_cpu_clock>` Specialization]
+
+ template <class CharT>
+ struct clock_string<process_cpu_clock, CharT>
+ {
+ static std::basic_string<CharT> name();
+ static std::basic_string<CharT> since();
+ };
+
+`clock_string<>::name()` returns "process_cpu_clock".
+
+`clock_string<>::since()` returns " since process start-up"
+
+[endsect]
+
+[section:times_numeric_limits `numeric_limits` Specialization for `process_times<>`]
 
     namespace std {
         template <>
- class numeric_limits<boost::chrono::process_cpu_clock::times> {
- typedef boost::chrono::process_cpu_clock::times Rep;
+ class numeric_limits<boost::chrono::process_times<Rep>> {
+ typedef boost::chrono::process_times<Rep> Res;
 
         public:
             static const bool is_specialized = true;
- static Rep min();
- static Rep max();
- static Rep lowest();
+ static Res min();
+ static Res max();
+ static Res lowest();
             static const int digits;
             static const int digits10;
             static const bool is_signed = false;
@@ -3647,7 +4341,7 @@
         };
     }
 
-The `times` specialization functions `min()`, `max()` and `lowest()` uses the relative functions on the representation of each component.
+The `process_times<Rep>` specialization functions `min()`, `max()` and `lowest()` uses the relative functions on the representation of each component.
 
 Notes
 
@@ -3672,6 +4366,8 @@
     namespace boost { namespace chrono {
 
         class thread_clock;
+ template <class CharT>
+ struct clock_string<thread_clock, CharT>;
 
     } }
 
@@ -3701,17 +4397,312 @@
             typedef chrono::__time_point<thread_clock> time_point;
             static constexpr bool is_steady = BOOST_CHRONO_THREAD_CLOCK_IS_STEADY;
 
- static time_point now( system::error_code & ec = system::throws );
+ static time_point now( ) noexcept;
+ static time_point now( system::error_code & ec );
+ };
+
+
+[endsect]
+
+
+[section:clock_string_thread_clock `clock_string<thread_clock>` Specialization]
+
+ #if defined(BOOST_CHRONO_HAS_THREAD_CLOCK)
+ template <class CharT>
+ struct clock_string<thread_clock, CharT>
+ {
+ static std::basic_string<CharT> name();
+ static std::basic_string<CharT> since();
+ };
+ #endif
+
+`clock_string<>::name()` returns "thread_clock".
+
+`clock_string<>::since()` returns " since thread start-up"
+
+
+[endsect]
+
+[endsect]
+
+
+
+[endsect]
+
+[/ ////////////////////////////////////////////
+
+[section:stopwatches Stopwatches]
+
+[section:simple_stopwatch_req `SimpleStopwatch` Requirements]
+
+A SimpleStopwatch measure the amount of time elapsed from a start point in time.
+
+While __Clock are static and not instantiated, `SimpleStopwatch` are instantiated and associated to a given __Clock.
+
+A `S` meets the `SimpleStopwatch` requirements if:
+
+* `S::clock` meets the __Clock requirements, and
+* meets the requirements specified in the following table.
+
+In this table `S` denote a SimpleStopwatch type. `s` is an instance of `S`, `ec` is instance of `system::error_code`.
+
+[table SimpleStopwatch Requirements
+ [[expression] [return type] [operational semantics]]
+ [[`S::clock`] [A model of __Clock.] [The clock associated to this Stopwatch.]]
+ [[`S::duration`] [`S::clock::duration`] [The __duration type of the `clock`.]]
+ [[`S::time_point`] [`S::clock::time_point`] [The __time_point type of the `clock`.]]
+ [[`s.elapsed()`] [`S::duration`] [the elapsed time while the SimpleStopwatch was running.]]
+ [[`s.reset()`] [] [Resets as if it was constructed again.]]
+
+ [[`s.elapsed(ec)`] [`S::duration`] [the elapsed time while the SimpleStopwatch was running.]]
+ [[`s.reset(ec)`] [] [Resets as if it was constructed again.]]
+]
+
+[section:elapsed Member Function `elapsed()`]
+
+ duration elapsed() const noexcept;
+
+__returns the elapsed time.
+
+[endsect]
+
+[section:elapsed_ec Member Function `elapsed(system::error_code & )`]
+
+ duration elapsed(system::error_code & ec) const;
+
+__returns the cumulated elapsed time.
+
+__effects When there is an internal error stores the error code in the `ec` parameter if it is different from `boost::throws()`.
+
+__throws Any exception the `Clock::now` function can throw when `ec` is `throws()`, otherwise none.
+
+[endsect]
+
+
+Models of `SimpleStopwatch `:
+
+* __simple_stopwatch
+
+[endsect]
+
+
+[section:stopwatch_req `Stopwatch` Requirements]
+
+As a __SimpleStopwatch, a Stopwatch measure the amount of time elapsed from a start point in time. The main difference is that a Stopwatch can be started and stopped (and restarted). The duration between these two time points is called a lap. It could have in addition the capability to collect these lap samples.
+
+A `S` meets the `Stopwatch` requirements if:
+
+* `S` meets the __SimpleStopwatch requirements, and
+* meets the requirements specified in the following table.
+
+In this table `S` denote `Stopwatch` type. `s` is an instance of `S`, `ec` is instance of `system::error_code`.
+
+[table Stopwatch Requirements
+ [[expression] [return type] [operational semantics]]
+ [[`S::laps_collector `] [ A model of __LapsCollector] [Collects the laps's samples.]]
+ [[`S::scoped_run`] [`__stopwatch_runner<S>`] [RAI which `start`/`stop` the `stopwatch`.]]
+ [[`S::scoped_stop`] [`__stopwatch_stopper<S>`] [RAI which `stop`/`start` the `stopwatch`.]]
+ [[`s.start()`] [] [starts a Stopwatch.]]
+ [[`s.restart()`] [] [restarts a Stopwatch.]]
+ [[`s.stop()`] [] [stops a Stopwatch.]]
+ [[`s.is_running()`] [bool] [true if the Stopwatch is running.]]
+ [[`s.lap_collector()`] [`S::laps_collector const&`] [the elapsed time while the Stopwatch was running.]]
+ [[`s.start(ec)`] [] [starts a Stopwatch.]]
+ [[`s.restart(ec)`] [] [restarts a Stopwatch.]]
+ [[`s.stop(ec)`] [] [stops a Stopwatch.]]
+]
+
+[section:start Member Function `start()`]
+
+ void start() noexcept;
+
+__effects Starts running the stopwatch.
+
+__returns the starting time point.
+
+[endsect]
+[section:start_ec Member Function `start(system::error_code&)`]
+
+ void start( system::error_code & ec = throws() );
+
+__effects Starts running the stopwatch.
+When there is an internal error stores the error code in the `ec` parameter if it is different from `throws()`.
+
+__throws Any exception the `S::clock::now` function can throw when `ec` is `throws()`
+
+[endsect]
+[section:stop Member Function `stop()`]
+
+ void stop();
+
+__effects Stops running the stopwatch.
+
+__throws Any exception the __LapsCollector can throw.
+
+[endsect]
+
+[section:stop_ec Member Function `stop(system::error_code&)`]
+
+ void stop( system::error_code & ec = throws() );
+
+__effects Stops running the stopwatch.
+When there is an internal error stores the error code in the `ec` parameter if it is different from `throws()`.
+
+__throws Any exception the `__LapsCollector::store()` or `S::clock::now()` can throw when `ec` is `throws()`
+
+[endsect]
+
+[section:restart Member Function `restart()`]
+
+ void restart( system::error_code & ec = throws() );
+
+__effects `stop`/`start` the stopwatch.
+
+__throws Any exception the `S::clock::now` function can throw when `ec` is `throws()`
+
+[endsect]
+
+[section:elapsed Member Function `get_laps_collector()`]
+
+ duration get_laps_collector() const noexcpt;
+
+__returns the laps_collector instance.
+
+[endsect]
+
+
+[endsect]
+
+[section:laps_collector_req `LapsCollector` Requirements]
+
+
+[endsect]
+
+
+[section:suspendable_stopwatch_req `SuspendableStopwatch ` Requirements]
+
+A SuspendableStopwatch is a Stopwatch that in addition can be suspended and resumed.
+
+A `S` meets the `SuspendableStopwatch` requirements if:
+
+* `S` meets the __Stopwatch requirements, and
+* meets the requirements specified in the following table.
+
+In this table `S` denote `SuspendableStopwatch` type, `s` is an instance of `S`, `ec` is instance of `system::error_code`.
+
+[table Stopwatch Requirements
+ [[`S::scoped_resume`] [`__stopwatch_resumer<S>`] [RAI which `resume`/`suspend` the `stopwatch`.]]
+ [[`S::scoped_resume`] [`__stopwatch_resumer<S>`] [RAI which `resume`/`suspend` the `stopwatch`.]]
+ [[`s.resume()`] [] [resume a Stopwatch.]]
+ [[`s.suspend()`] [] [suspends a Stopwatch.]]
+]
+
+
+[section:suspend Member Function `suspend()`]
+
+ duration suspend( system::error_code & ec = throws() );
+
+__effects Suspends the stopwatch.
+
+__throws Any exception the `S::clock::now` function can throw when `ec` is `throws()`
+
+[endsect]
+[section:resume Member Function `resume()`]
+
+ time_point resume( system::error_code & ec = throws() );
+
+__effects Resumes the stopwatch.
+
+__returns the starting time point.
+
+__throws Any exception the `S::clock::now` function can throw.
+
+[endsect]
+
+[endsect]
+
+[/==================================================]
+[section:simple_stopwatch_hpp Header `<boost/chrono/stopwatches/simple_stopwatch.hpp>`]
+[/==================================================]
+
+ namespace boost {
+ namespace chrono {
+ template <class __Clock=high_resolution_clock>
+ class simple_stopwatch;
+
+ // useful typedefs
+ typedef <see above> system_simple_stopwatch;
+ #ifdef __BOOST_CHRONO_HAS_CLOCK_STEADY
+ typedef <see above> steady_simple_stopwatch;
+ #endif
+ typedef <see above> high_resolution_simple_stopwatch;
+ }}
+
+[section:simple_stopwatch Template Class `simple_stopwatch<>`]
+
+Knowing how long a part of a program takes to execute is useful in both test and production environments.
+A __simple_stopwatch` object measures elapsed time. It is recommended to use it with clocks that measure wall clock rather than CPU time since the intended use is performance measurement on systems where total elapsed time is more important than just process or CPU time.
+
+The maximum measurable elapsed time depends on the __Clock parameter. The accuracy of timings depends on the
+accuracy of timing information provided the __Clock, and this could varies a great deal from one clock to another.
+
+`simple_stopwatch <>` is a model of a __simple_stopwatch_concept.
+
+ template <class __Clock> class simple_stopwatch {
+ public:
+ typedef Clock clock;
+ typedef typename Clock::duration duration;
+ typedef typename Clock::time_point time_point;
+
+ simple_stopwatch( );
+ explicit simple_stopwatch( system::error_code & ec );
+
+ ~simple_stopwatch();
+
+ duration elapsed( );
+ duration elapsed( system::error_code & ec );
+
         };
 
+Only the specificities of this class are documented here. See __simple_stopwatch_concept for the common parts.
+
+[section:c1 Constructor `simple_stopwatch()`]
+
+ simple_stopwatch();
+
+__effects constructs and starts the simple_stopwatch.
+
+__throws Any exception the `Clock::now()`can throw.
 
 [endsect]
 
+[section:c2 Constructor `simple_stopwatch( system::error_code &)`]
+
+ explicit simple_stopwatch( system::error_code & ec = throws() );
+
+__effects constructs and starts the simple_stopwatch.
+
+__throws Any exception the `Clock::now()`can throw when `ec` is `throws()`
+
 [endsect]
 
+[endsect]
+
+[section:typedefs `simple_stopwatch` useful typedefs]
+
+The following typedef are provided as syntactic sugar.
 
+ typedef simple_stopwatch< boost::chrono::system_clock > system_simple_stopwatch;
+ #ifdef __BOOST_CHRONO_HAS_CLOCK_STEADY
+ typedef simple_stopwatch< boost::chrono:: steady_clock > steady_simple_stopwatch;
+ #endif
+ typedef simple_stopwatch< boost::chrono:: high_resolution_clock > high_resolution_simple_stopwatch;
 
 [endsect]
+[endsect]
+[endsect]
+
+][/ /////////////////////////////////////////]
 
 [/
 [section:deprecated Deprecated Headers]
@@ -3725,7 +4716,7 @@
 This header has been deprecated, use instead <boost/chrono/stopwatch.hpp>.
 
     namespace boost { namespace chrono {
- template <class Clock=high_resolution_clock> class timer;
+ template <class __Clock=high_resolution_clock> class timer;
         typedef <see above> system_timer;
         #ifdef __BOOST_CHRONO_HAS_CLOCK_STEADY
         typedef <see above> steady_timer;
@@ -3743,14 +4734,14 @@
 Knowing how long a part of a program takes to execute is useful in both test and production environments.
 A `timer` object measures elapsed time. It is recommended to use it with clocks that measure wall clock rather than CPU time since the intended use is performance measurement on systems where total elapsed time is more important than just process or CPU time.
 
-The maximum measurable elapsed time depends on the Clock parameter. The accuracy of timings depends on the
-accuracy of timing information provided the Clock, and this coudl varies a great deal from one clock to another.
+The maximum measurable elapsed time depends on the __Clock parameter. The accuracy of timings depends on the
+accuracy of timing information provided the __Clock, and this could varies a great deal from one clock to another.
 
- template <class Clock> class timer {
+ template <class __Clock> class timer {
         public:
- typedef Clock clock;
- typedef typename Clock::duration duration;
- typedef typename Clock::time_point time_point;
+ typedef __Clock clock;
+ typedef typename __Clock::duration duration;
+ typedef typename __Clock::time_point time_point;
 
             explicit timer( system::error_code & ec = system::throws );
 
@@ -3787,7 +4778,9 @@
 [section:process_times_hpp Deprecated Header `<boost/chrono/process_times.hpp>`]
 [/==================================================================]
 
-This header has been deprecated. Use instead `<boost/chrono/process_cpu_clocks.hpp>`, `<boost/chrono/stopwatch.hpp>`, `<boost/chrono/stopwatch_reporter.hpp>` and `<boost/chrono/stopclock.hpp>` files.
+This header has been deprecated. Use instead `<boost/chrono/process_cpu_clocks.hpp>`, `<boost/chrono/stopwatch.hpp>`, `<boost/chrono/stopwatch_reporter.hpp>`.
+
+[/and `<boost/chrono/stopclock.hpp>` files.]
 
     namespace boost { namespace chrono {
 
@@ -3800,7 +4793,7 @@
 
 [section:process_clock Class `process_clock`]
 
-`process_clock` doesn't satisfy the Clock Requirements as the function now do not follows the Clock prototype.
+`process_clock` doesn't satisfy the __Clock Requirements as the function now do not follows the __Clock prototype.
 
 `process_clock` provides a thin wrapper around the operating system's process time API. For POSIX-like systems, that's the times() function, while for Windows, it's the GetProcessTimes() function.
 
@@ -3931,17 +4924,44 @@
 [/=================]
 
 [/==================================]
-[section:history Appendix A: History]
+[section:history Appendix: History]
 [/==================================]
 
-[section [*Version 1.2.0, September 3, 2011] ]
+[section [*Version 1.2.0, October 17, 2011] ]
+
+[*New Features:]
+
+* [@http://svn.boost.org/trac/boost/ticket/5979 #5979] Added chrono rounding utilities as defined By Howard Hinnant [@http://home.roadrunner.com/~hinnant/duration_io/chrono_util.html here].
+* [@http://svn.boost.org/trac/boost/ticket/5978 #5978] Add BOOST_CHRONO_HAS_PROCESS_CLOCKS to know if process clocks are available.
+* [@http://svn.boost.org/trac/boost/ticket/5906 #5906] Take in account the constexpr as defined in the standard.
+* [@http://svn.boost.org/trac/boost/ticket/5907 #5907] Take in account noexcept for compilers supporting it.
 
 [*Fixes:]
 
 * [@http://svn.boost.org/trac/boost/ticket/5669 #5669] Intel compiler failure to compile duration.hpp
 * [@http://svn.boost.org/trac/boost/ticket/2114 #2114] Enable visibility support (Boost.Chorno part)
+* [@http://svn.boost.org/trac/boost/ticket/5909 #5909] process_cpu_clock::now() on MAC gives time_points 1/1000 times.
+* [@http://svn.boost.org/trac/boost/ticket/5946 #5946] Process real cpu clock returns the system steady clock (windows).
+* [@http://svn.boost.org/trac/boost/ticket/5974 #5974] Process real cpu clock should use clock() instead of times() in MAC which is twice faster and have better resolution.
+
 
-[endsect] [/section [*Version 1.2.0, September 3, 2011] ]
+[*Cleanup:]
+
+* [@http://svn.boost.org/trac/boost/ticket/5975 #5975] Reduce the combinations of header-only, shared, static link to reduce test time by 50%.
+* [@http://svn.boost.org/trac/boost/ticket/5976 #5976] chrono_accuracy_test is not deterministic and should be removed from the regression tests
+* [@http://svn.boost.org/trac/boost/ticket/5977 #5977] Remove old files from Beman's version. Some old files included in the Beman's version and not documented in the reviewed version that have been definitely removed from the repository as
+ * boost/chrono/timer.hpp,
+ * boost/chrono/process_times.hpp
+ * boost/chrono/detail/process_clock.hpp,
+ * boost/chrono/detail/mac/process_clock.hpp,
+ * boost/chrono/detail/posix/process_clock.hpp,
+ * boost/chrono/detail/win/process_clock.hpp,
+ * boost/chrono/detail/run_timer.hpp,
+ * boost/chrono/detail/run_timer_static.hpp,
+
+
+
+[endsect] [/section [*Version 1.2.0] ]
 
 
 [section [*Version 1.1.0, Mars 17, 2011] ]
@@ -3949,14 +4969,14 @@
 [*New Features:]
 
 * [@http://svn.boost.org/trac/boost/ticket/???? #????] Added time_point unary operators +,-,++,-- and binary operators +=,-= with Rep al RHS.
-* [@http://svn.boost.org/trac/boost/ticket/5323 #5323] Add Associated type difference_type for chrono::time_point.
+* [@http://svn.boost.org/trac/boost/ticket/5323 #5323] Add Associated type difference_type for chrono::time_point.
 
 [*Fixes:]
 
 * [@http://svn.boost.org/trac/boost/ticket/5322 #5322] Explicit default constructed chrono::durations are uninitialized
-
 
-[endsect] [/section [*Version 1.1.0, Mars 17, 2011] ]
+
+[endsect] [/section [*Version 1.1.0] ]
 
 [section [*Version 1.0.0, January 6, 2011] ]
 
@@ -3992,7 +5012,7 @@
 
 * Removed some not useful parts as the test and the tickets.
 
-[endsect] [/section [*Version 1.0.0, January 6, 2011] ]
+[endsect] [/section [*Version 1.0.0] ]
 
 [/
 [section [*Version 0.6.0, September 22, 2010] ]
@@ -4041,7 +5061,7 @@
 
 [*Bug Fixes]
 
-* __process_cpu_clock is now a valid model of Clock that can be used with __stopclocks_accumulator__.
+* __process_cpu_clock is now a valid model of __Clock that can be used with __stopclocks_accumulator__.
 * eliminate or suppress a lot of warnings appearing with with warnings=all -Wextra
 * improve the error code handling
 
@@ -4170,7 +5190,7 @@
     * Added time formatter "real %rs, cpu %cs (%p%), user %us, system %ss\\n"
     * Added digital_time formatter "%d days(s) %h:%m:%s.%n\\n"
 * __stopwatch_reporter__ is a convenient generic class reporting elapsed time for the Stopwatch concept.
-* Added `stopclock<Clock>` shortcut `stopwatch_reporter<stopwatch<Clock>>`
+* Added `stopclock<__Clock>` shortcut `stopwatch_reporter<stopwatch<__Clock>>`
 * Added __scoped_stopclock__ which trace at the constuctor and destructor.
 * Added `typeof` registration for classes __duration and __time_point
 
@@ -4278,7 +5298,7 @@
 [endsect]
 
 [/======================================]
-[section:rationale Appendix B: Rationale]
+[section:rationale Appendix: Rationale]
 
 See [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2661.htm [*N2661 - A Foundation to Sleep On]] which is very informative and provides motivation for key design decisions. This section contains some extracts from this document.
 
@@ -4308,7 +5328,7 @@
 
 
 [/======================================================]
-[section:implementation Appendix C: Implementation Notes]
+[section:implementation Appendix: Implementation Notes]
 
 [heading Which APIs have been chosen to implement each clock on each platform?]
 
@@ -4328,7 +5348,7 @@
 [endsect]
 
 [/======================================================]
-[section:faq Appendix D: FAQ]
+[section:faq Appendix: FAQ]
 
 [heading Why does process_cpu_clock sometimes give more cpu seconds than real seconds?]
 
@@ -4347,10 +5367,10 @@
 
 For trace purposes, it is probably best to use a system-wide clock.
 
-[endsect] [/section:faq Appendix D: FAQ]
+[endsect] [/section:faq Appendix: FAQ]
 
 [/====================================================]
-[section:acknowledgements Appendix E: Acknowledgements]
+[section:acknowledgements Appendix: Acknowledgements]
 
 The library's code was derived from Howard Hinnant's time2_demo prototype. Many thanks to Howard for making his code available under the Boost license. The original code was modified by Beman Dawes to conform to Boost conventions.
 
@@ -4372,286 +5392,30 @@
 
 [endsect]
 
-[/
-[/====================================================]
-[section:tests Appendix F: Tests]
-
-In order to test you need to do.
-
- bjam libs/chrono/test
-
-You can also run a specific suite of test by doing
-
- cd libs/chrono/test
- bjam chrono
-
-
-[section chrono]
-[table
- [[Name] [kind] [Description] [Result] [Ticket]]
- [[chrono_unit_test] [run] [...] [Pass] [#]]
- [[explore_limits] [run] [...] [Pass] [#]]
- [[test_duration] [run] [...] [Pass] [#]]
- [[test_clock] [run] [...] [Pass] [#]]
- [[miscellaneous] [run] [...] [Pass] [#]]
- [[test_special_values] [run] [...] [Pass] [#]]
- [[manipulate_clock_object] [run] [...] [Pass] [#]]
- [[chrono_accuracy_test] [run] [...] [Pass] [#]]
-
-]
-[endsect]
-
-[section examples]
-[table
- [[Name] [kind] [Description] [Result] [Ticket]]
- [[cycle_count] [run] [...] [Pass] [#]]
- [[runtime_resolution] [run] [...] [Pass] [#]]
- [[xtime] [run] [...] [Pass] [#]]
- [[saturating] [run] [...] [Pass] [#]]
- [[min_time_point] [run] [...] [Pass] [#]]
- [[i_dont_like_the_default_duration_behavior] [run] [...] [Pass] [#]]
- [[simulated_thread_interface_demo] [run] [...] [Pass] [#]]
- [[timeval_demo] [run] [...] [Pass] [#]]
-]
-[endsect]
-
-
-[section Other Clocks]
-[table
- [[Name] [kind] [Description] [Result] [Ticket]]
- [[test_thread_clock] [run] [test basic uses of thread_clock.] [Pass] [#]]
-]
-[endsect]
-
-[section:typedefs Duration Typedef's]
-[table
- [[Name] [kind] [Description] [Result] [Ticket]]
- [[hours.pass] [run] [check how many hours we can count.] [Pass] [#]]
- [[minutes.pass] [run] [check how many minutes we can count.] [Pass] [#]]
- [[seconds.pass] [run] [check how many seconds we can count.] [Pass] [#]]
- [[milliseconds.pass] [run] [check how many milliseconds we can count.] [Pass] [#]]
- [[microseconds.pass] [run] [check how many microseconds we can count.] [Pass] [#]]
- [[nanoseconds.pass] [run] [check how many nanoseconds we can count.] [Pass] [#]]
-]
-[endsect]
-
-[section traits]
-[table
- [[Name] [kind] [Description] [Result] [Ticket]]
- [[specialization.duration.pass] [run] [check the correct common_type specialization has been done for duration.] [Pass] [#]]
- [[specialization.time_point.pass] [run] [check the correct common_type specialization has been done for time_point.] [Pass] [#]]
- [[is_fp.treat_as_floating_point.pass] [run] [check treat_as_floating_point<T> inherits from is_floating_point<T>.] [Pass] [#]]
- [[duration_values.max.pass] [run] [check max() corresponds to std::numeric_limits<T>::max().] [Pass] [#]]
- [[duration_values.min.pass] [run] [check min() corresponds to std::numeric_limits<T>::lowest().] [Pass] [#]]
- [[duration_values.zero.pass] [run] [check zero is 0.] [Pass] [#]]
-]
-[endsect]
-
-[section duration]
-[table
- [[Name] [kind] [Description] [Result] [Ticket]]
- [[duration.fail] [compile-fail] [If a program instantiates duration with a duration type for the template argument Rep a diagnostic is required.] [Pass] [#]]
- [[ratio.fail] [compile-fail] [Period shall be a specialization of ratio, diagnostic required..] [Pass] [#]]
- [[positive.fail] [compile-fail] [Period::num shall be positive, diagnostic required..] [Pass] [#]]
- [[defaul_ratio.pass] [run] [Test default template arg.] [Pass] [#]]
- [[types.pass] [run] [Test nested types.] [Pass] [#]]
-
- [[arithmetic.op_divide_ass.pass] [run] [check duration& operator/=(const rep& rhs);] [Pass] [#]]
- [[arithmetic.op_minusminusint.pass] [run] [check duration operator--(int);] [Pass] [#]]
- [[arithmetic.op_plus_ass.pass] [run] [check duration& operator+=(const duration& d);] [Pass] [#]]
- [[arithmetic.op_minus.pass] [run] [check duration operator-() const;] [Pass] [#]]
- [[arithmetic.op_mod_ass_duration.pass] [run] [check duration& operator%=(const duration& rhs);] [Pass] [#]]
- [[arithmetic.op_plusplus.pass] [run] [check duration& operator++();.] [Pass] [#]]
- [[arithmetic.op_minus_ass.pass] [run] [check duration& operator-=(const duration& d);] [Pass] [#]]
- [[arithmetic.op_mod_ass_rep.pass] [run] [check duration& operator%=(const rep& rhs)] [Pass] [#]]
- [[arithmetic.op_plusplusint.pass] [run] [check duration operator++(int);] [Pass] [#]]
- [[arithmetic.op_minusminus.pass] [run] [check duration operator--();] [Pass] [#]]
- [[arithmetic.op_plus.pass] [run] [check duration operator+() const;] [Pass] [#]]
- [[arithmetic.op_times_ass.pass] [run] [check duration& operator*=(const rep& rhs);.] [Pass] [#]]
-
- [[cast.duration_cast.pass] [run] [check template <class ToDuration, class Rep, class Period> ToDuration duration_cast(const duration<Rep, Period>& d);] [Pass] [#]]
- [[cast.toduration.fail] [compile-fail] [check ToDuration shall be an instantiation of duration.] [Pass] [#]]
-
- [[comparisons.op_equal.pass] [run] [check operator==() and operator!=().] [Pass] [#]]
- [[comparisons.op_less.pass] [run] [check operators <,<=,>,>=.] [Pass] [#]]
-
-]
-[table
- [[Name] [kind] [Description] [Result] [Ticket]]
-
- [[cons.convert_exact.pass] [run] [check exact conversions allowed for integral reps.] [Pass] [#]]
- [[cons.convert_float_to_int.fail] [compile-fail] [check conversions from floating-point to integral durations disallowed.] [Pass] [#]]
- [[cons.convert_inexact.fail] [compile-fail] [check inexact conversions disallowed for integral reps.] [Pass] [#]]
- [[cons.convert_inexact.pass] [run] [check inexact conversions allowed for floating-point reps.] [Pass] [#]]
- [[cons.convert_int_to_float.pass] [run] [check conversions from integral to floating-point durations allowed.] [Pass] [#]]
- [[cons.default.pass] [run] [check Rep must be default initialized, not initialized with 0.] [Pass] [#]]
- [[cons.rep.pass] [run] [check explicit duration(const Rep2& r).] [Pass] [#]]
- [[cons.rep01.fail] [compile-fail] [test for explicit.] [Pass] [#]]
- [[cons.rep02.fail] [compile-fail] [check Rep2 shall be implicitly convertible to rep.] [Pass] [#]]
- [[cons.rep02.pass] [run] [check construct double with int.] [Pass] [#]]
- [[cons.rep03.fail] [compile-fail] [treat_as_floating_point<Rep2>::value shall be false.] [Pass] [#]]
-
- [[nonmember.op_plus.pass] [run] [check operator+(d,d).] [Pass] [#]]
- [[nonmember.op_minus.pass] [run] [check operator-(d,d).] [Pass] [#]]
- [[nonmember.op_divide_duration.pass] [run] [check operator/(d,d).] [Pass] [#]]
- [[nonmember.op_divide_rep.fail] [compile-fail] [check operator/(d,r) fails with different rep.] [Pass] [#]]
- [[nonmember.op_divide_rep.pass] [run] [check operator/(d,r).] [Pass] [#]]
- [[nonmember.op_mod_duration.pass] [run] [check operator%(d,d).] [Pass] [#]]
- [[nonmember.op_mod_rep.pass] [run] [check operator%(d,r).] [Pass] [#]]
- [[nonmember.op_times_rep.pass] [run] [check operator*(d,r).] [Pass] [#]]
- [[nonmember.op_times_rep1.fail] [compile-fail] [check operator*(d,r) fails with different rep.] [Pass] [#]]
- [[nonmember.op_times_rep2.fail] [compile-fail] [check operator*(r,d) fails with different rep.] [Pass] [#]]
- [[special.max.pass] [run] [check coherency between max and duration_values traits.] [Pass] [#]]
- [[special.min.pass] [run] [check coherency between min and duration_values traits.] [Pass] [#]]
- [[special.zero.pass] [run] [check coherency between zero and duration_values traits.] [Pass] [#]]
-]
-[endsect]
-
-[section time_point]
-[table
- [[Name] [kind] [Description] [Result] [Ticket]]
- [[default_duration.pass] [run] [check .] [Pass] [#]]
- [[duration.fail] [compile-fail] [check .] [Pass] [#]]
-
- [[arithmetic.op_plus_ass.pass] [run] [check .] [Pass] [#]]
- [[arithmetic.op_plus_ass.pass] [run] [check .] [Pass] [#]]
- [[cast.time_point_cast.pass] [run] [check .] [Pass] [#]]
- [[cast.toduration.fail] [compile-fail] [check .] [Pass] [#]]
- [[comparisons.op_equal.fail] [compile-fail] [check .] [Pass] [#]]
- [[comparisons.op_equal.pass] [run] [check .] [Pass] [#]]
- [[comparisons.op_less.fail] [compile-fail] [check .] [Pass] [#]]
- [[comparisons.op_less.pass] [run] [check .] [Pass] [#]]
- [[cons.convert.fail] [compile-fail] [check .] [Pass] [#]]
- [[cons.convert.pass] [run] [check .] [Pass] [#]]
- [[cons.default.pass] [run] [check .] [Pass] [#]]
- [[cons.duration..fail] [compile-fail] [check .] [Pass] [#]]
- [[cons.duration.pass] [run] [check .] [Pass] [#]]
- [[nonmember.op_plus.pass] [run] [check .] [Pass] [#]]
- [[nonmember.op_minus_time_point.pass] [run] [check .] [Pass] [#]]
- [[nonmember.op_minus_duration.pass] [run] [check .] [Pass] [#]]
- [[special.max.pass] [run] [check .] [Pass] [#]]
- [[special.min.pass] [run] [check .] [Pass] [#]]
-]
-[endsect]
-
-[section clock]
-[table
- [[Name] [kind] [Description] [Result] [Ticket]]
- [[hires.consistency.pass] [run] [check .] [Pass] [#]]
- [[hires.now.pass] [run] [check .] [Pass] [#]]
- [[steady.consistency.pass] [run] [check .] [Pass] [#]]
- [[steady.now.pass] [run] [check .] [Pass] [#]]
- [[system.consistency.pass] [run] [check .] [Pass] [#]]
- [[system.now.pass] [run] [check .] [Pass] [#]]
- [[system.from_time_t.pass] [run] [check .] [Pass] [#]]
- [[system.rep_signed.pass] [run] [check .] [Pass] [#]]
- [[system.rep_signed.pass] [run] [check .] [Pass] [#]]
- [[process.consistency.pass] [run] [check .] [Pass] [#]]
- [[process.now.pass] [run] [check .] [Pass] [#]]
- [[thread.consistency.pass] [run] [check .] [Pass] [#]]
- [[thread.now.pass] [run] [check .] [Pass] [#]]
-]
-
-
-[endsect]
-
-
-[section io examples]
-[table
- [[Name] [kind] [Description] [Result] [Ticket]]
- [[io_ex1.pass] [run] [check .] [Pass] [#]]
- [[io_ex2.pass] [run] [check .] [Pass] [#]]
- [[io_ex3.pass] [run] [check .] [Pass] [#]]
- [[io_ex4.pass] [run] [check .] [Pass] [#]]
- [[io_ex5.pass] [run] [check .] [Pass] [#]]
-]
-[endsect]
-
-
-
-[endsect]
 [/=====================================]
-[section:tickets Appendix G: Tickets]
-
-[table
- [[Ticket] [Description] [Resolution] [State]]
- [[0] [ Issues raised by Michael Marcin: In the past I've seen QueryPerformanceCounter give incorrect results,
- especially with SpeedStep processors on laptops. This was many years ago and
- might have been fixed by service packs and drivers.
-
- Typically you check the results of QPC against GetTickCount to see if the
- results are reasonable.
- http://support.microsoft.com/kb/274323
-
- I've also heard of problems with QueryPerformanceCounter in multi-processor
- systems.
-
- I know some people SetThreadAffinityMask to 1 for the current thread call
- their QueryPerformance* functions then restore SetThreadAffinityMask. This
- seems horrible to me because it forces your program to jump to another
- physical processor if it isn't already on cpu0 but they claim it worked well
- in practice because they called the timing functions infrequently.
-
- In the past I have chosen to use timeGetTime with timeBeginPeriod(1) for
- high resolution timers to avoid these issues.
- ] [???] [*Open*]]
- [[1] [operator/ was ambiguous] [Disambiguate duration operator/] [Closed]]
- [[2] [CLOCK_STEADY is not defined with cygwin/gcc 3.4] [Disable code when BOOST_CHRONO_HAS_CLOCK_STEADY is not defined.] [Closed]]
- [[3] [result of metafunctions ratio_multiply and ratio_divide were not normalized ratios] [Use of the nested ratio typedef type on ratio arithmetic operations.] [Closed]]
- [[4] [Copy constructor from similar duration masked the defaulted operations] [Added duration defaulted implementations] [Closed]]
- [[5] [INTMAX_C is not always defined] [Replace INTMAX_C by BOOST_INTMAX_C until boost/cstdint.hpp ensures INTMAX_C is always defined.] [Closed]]
- [[6] [undefined BOOST_CHRONO_HAS_CLOCK_STEADY when BOOST_CHRONO_WINDOWS_API] [Define BOOST_CHRONO_HAS_CLOCK_STEADY when BOOST_CHRONO_WINDOWS_API] [Closed]]
- [[7] [min/max macros intrussion] [Take care of Boost min/max recommendations] [Closed]]
- [[8] [declaration of 'typedef class boost::chrono::duration<..> changes meaning of 'duration'] [complete qualification when defining nested typedef duration on clocks to avoid the following compile error:] [Closed]]
- [[9] [VC++ warnings] [disable VC++ foolishness] [Closed]]
-]
-[table
- [[Ticket] [Description] [Resolution] [State]]
-
- [[10] [conversion warning in test_duration] [removal of conversion warning in test_duration] [Closed]]
- [[11] [MSVC reports a warning instead of an error when there is an integral constant overflow] [manage with MSVC reporting a warning instead of an error when there is an integral constant overflow] [Closed]]
- [[12] [ambiguities with MSVC when using detail:: namespace] [Qualify with boost::detail boost::chrono::detail ] [Closed]]
- [[13] [warning C4251: 'boost::chrono::run_timer::m_format' : class 'std::basic_string<_Elem,_Traits,_Ax>' needs to have dll-interface to be used by clients of class 'boost::chrono::run_timer'] [don't include inlines functions using the std::string m_format] [Closed]]
- [[14] [Bad use of duration(0) on template classes] [remplace by duration::zero()] [Closed]]
- [[15] [suspend doesn't works: partial_ not initialized] [initialize with duration::zero()] [Closed]]
- [[16] [suspend doesn't works: elapsed doesn't take care of partial_] [take care of partial] [Closed]]
- [[17] [suspend doesn't works: bad use of system::error_code & ec] [replace by system::error_code ec] [Closed]]
- [[18] [warnings on mingw-gcc.4.4:
-
-..\..\../boost/chrono/chrono.hpp: In copy constructor 'boost::chrono::time_point<boost::chrono::process_cpu_clock,
-boost::chrono::duration<boost::chrono::process_cpu_clock::times, boost::ratio<1ll, 1000000000ll> >
->::time_point(const boost::chrono::time_point<boost::chrono::process_cpu_clock,
-boost::chrono::duration<boost::chrono::process_cpu_clock::times, boost::ratio<1ll, 1000000000ll> > >&)':
-..\..\../boost/chrono/chrono.hpp:816: warning: suggest parentheses around '&&' within '||'
-..\..\../boost/chrono/chrono.hpp:816: warning: suggest parentheses around '&&' within '||'
-
-] [???] [Closed]]
- [[19] [Use of Specific formatters doesn't works] [] [Closed]]
-
- [[20] [boost/chrono/scoped_suspend.hpp(31) : warning C4520: 'boost::chrono::scoped_suspend<Clock>' : multiple default constructors specified
-] [Remove the default constructor deletion ] [Closed]]
- [[21] [suspendible_clock_test doesn't works in my mingw environement] [(issue with tss)] [*Open*]]
- [[22] [error_code not initialized] [Use ec.clear() before throwing a exception.] [Closed]]
- [[23] [boost/thread/detail/cv_status.hpp file was not commited] [commit file] [Closed]]
- [[24] [Boost.Conversion was not packaged] [Package it] [Closed]]
- [[25] [Valgrind issue: Conditional jump or move depends on uninitialised value(s)] [Replace the test] [Closed]]
- [/[#] [XXXX] [XXXX] [Closed]]
-]
-
+[section:todo Appendix: Future plans]
+[/=====================================]
 
+[heading For later releases]
 
+* Enhance chrono I/O
+ * [@http://svn.boost.org/trac/boost/ticket/5980 #5980] Take care of the Howard Hinnant [@http://home.roadrunner.com/~hinnant/bloomington/chrono_io.html proposal] which has the advantage to provide I/O for system clocks using the Gregorian Calendar.
+ * [@http://svn.boost.org/trac/boost/ticket/5981 #5981] Added i/o state savers.
 
 
-[endsect]
+* Deprecate:
+ * chrono I/O: The manipulators duration_short, duration long are depreceated. You should use the parameterized form duration_fmt instead.
+ * chrono I/O: The duraction_punc<> facet observers is_short_name, is_long_name are depreceated. You should use is_prefix and is_symbol instead.
+ * chrono I/O: The duraction_punc<> facet constructors taking as argument the literals duraction_punc<>::use_long or use short are depreceated. You should use duration_style::prefix and duration_style::symbol instead.
+ * chrono I/O: The duraction_punc<> facet constructors taking the long names for seconds, minutes and hours and the associated observers short_name, long_name and name are depreceated.
+Boost.Chrono allows the user to use an interface that could be customized to take care of locale issues. The default behavior been to return the English words.
 
-]
-[/=====================================]
-[section:todo Appendix F: Future plans]
-[/=====================================]
+When BOOST_CHRONO_IO_V1_DONT_PROVIDE_DEPRECATED is defined the preceding deprecated functions are not available.
+In addition, the user needs to define the macro BOOST_CHRONO_IO_USES_EXTERNAL_LOCALIZATION to be able to customize the locale interface.
 
-[heading For later releases]
 
-* Add chrono utilities as defined By Howard Hinnant [@http://home.roadrunner.com/~hinnant/duration_io/chrono_util.html here].
+* Include Stopwatches.
+* Include chrono::date as defined by Howard Hinnant [@http://home.roadrunner.com/~hinnant/bloomington/date.html here].
 
 [endsect]
 


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