|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r59071 - in sandbox/chrono/libs/chrono: doc doc/html doc/html/boost_chrono doc/html/boost_chrono/appendices doc/html/boost_chrono/examples doc/html/boost_chrono/overview doc/html/boost_chrono/reference doc/html/boost_chrono/users_guide example src src/mac src/posix src/win test
From: vicente.botet_at_[hidden]
Date: 2010-01-16 07:59:00
Author: viboes
Date: 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
New Revision: 59071
URL: http://svn.boost.org/trac/boost/changeset/59071
Log:
Boost.Chrono: Version 0.3.0, Added doc for new features
* Added doc for stopclock
* Split of stopclock_example.cpp on several files
* Code cleanup
* revert to old interface process_times
Added:
sandbox/chrono/libs/chrono/example/digital_time_example.cpp (contents, props changed)
sandbox/chrono/libs/chrono/example/stopclock_example.cpp (contents, props changed)
sandbox/chrono/libs/chrono/example/stopwatch_accumulator_example.cpp (contents, props changed)
Text files modified:
sandbox/chrono/libs/chrono/doc/chrono.qbk | 434 +++++++++++++---------
sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices.html | 2
sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/history.html | 12
sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/implementation.html | 4
sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/rationale.html | 8
sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/todo.html | 4
sandbox/chrono/libs/chrono/doc/html/boost_chrono/examples/a_tiny_program_that_times_how_long_until_a_key_is_struck.html | 2
sandbox/chrono/libs/chrono/doc/html/boost_chrono/examples/si_units.html | 16
sandbox/chrono/libs/chrono/doc/html/boost_chrono/examples/simulated_thread_interface_demonstration_program.html | 6
sandbox/chrono/libs/chrono/doc/html/boost_chrono/examples/xtime_clock.html | 6
sandbox/chrono/libs/chrono/doc/html/boost_chrono/overview.html | 12
sandbox/chrono/libs/chrono/doc/html/boost_chrono/overview/motivation.html | 39 +
sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference.html | 22
sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/cpp0x.html | 2
sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/deprecated_headers.html | 16
sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/process_cpu_related.html | 4
sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/stopwatch_reporters.html | 735 ++++++++++-----------------------------
sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/stopwatches.html | 42 +-
sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide.html | 7
sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide/getting_started.html | 16
sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide/tutorial.html | 10
sandbox/chrono/libs/chrono/doc/html/index.html | 4
sandbox/chrono/libs/chrono/doc/html/standalone_HTML.manifest | 1
sandbox/chrono/libs/chrono/example/stopwatch_example.cpp | 24 -
sandbox/chrono/libs/chrono/src/mac/process_clock.cpp | 2
sandbox/chrono/libs/chrono/src/posix/process_clock.cpp | 2
sandbox/chrono/libs/chrono/src/process_clock.cpp | 2
sandbox/chrono/libs/chrono/src/process_cpu_clocks.cpp | 2
sandbox/chrono/libs/chrono/src/run_timer.cpp | 30
sandbox/chrono/libs/chrono/src/run_timer_static.cpp | 2
sandbox/chrono/libs/chrono/src/win/process_clock.cpp | 2
sandbox/chrono/libs/chrono/test/Jamfile.v2 | 6
sandbox/chrono/libs/chrono/test/miscellaneous.cpp | 2
33 files changed, 592 insertions(+), 886 deletions(-)
Modified: sandbox/chrono/libs/chrono/doc/chrono.qbk
==============================================================================
--- sandbox/chrono/libs/chrono/doc/chrono.qbk (original)
+++ sandbox/chrono/libs/chrono/doc/chrono.qbk 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -60,7 +60,7 @@
* `process_real_CPU_clocks`, capturing real-CPU times.
* `process_user_CPU_clocks`, capturing user-CPU times.
* `process_system_CPU_clocks`, capturing system-CPU times.
- * `process_clocks`, tuple-like class capturing at once real, user-CPU, and system-CPU times.
+ * `process_cpu_clocks`, tuple-like class capturing at once real, user-CPU, and system-CPU times.
* Stopwatches:
* `stopwatch`, capturing elapsed Clock times.
@@ -68,9 +68,9 @@
* scoped helper classes allowing to pairwise start/stop operations, suspend/resume and resume/suspend a Stopwatch.
* `process_stopwatches`, capturing elapsed real, user-CPU, and system-CPU times.
-* Stopwatch reporters:
+* Stopclocks or Stopwatch reporters:
* `stopwatch_reporter`, convenient reporting of models of Stopwatch results.
- * `process_stopwatches_reporter`, convenient reporting of process_stopwatches results.
+ * `stopclock<Clock>` shortcut of `stopwatch_reporter<stopwatch<Clock>>`
[/====================================]
[heading How to Use This Documentation]
@@ -403,12 +403,12 @@
[section Stopwatches]
-Knowing how long a program, a function or a specific block takes to execute is useful in both test and production environments.
-__Boost_Chrono__ introduces the Stopwatch concept which captures the mechanism to measure the elapsed time.
-A Stopwatch allows to start, stop, suspend and resume the measure of the eleapsed time.
+Knowing how long a program, a function or a specific block takes to execute is useful in both test and production environments.
+__Boost_Chrono__ introduces the Stopwatch concept which captures the mechanism to measure the elapsed time.
+A Stopwatch allows to start, stop, suspend and resume the measure of the eleapsed time.
`stopwatch<>` is the basic model of Stopwatch
-At the user level, the main use case of measuring the elapsed time is to report these measures on the display.
+At the user level, the main use case of measuring the elapsed time is to report these measures on the display.
`stopwatch_reporter<>` 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
@@ -420,7 +420,7 @@
std::sqrt( 123.456L ); // burn some time
return 0;
- }
+ }
int main() {
f1(100000);
f1(200000);
@@ -432,7 +432,6 @@
The preceding stopwatch manage only with a measure. It is also interesting to have an statisitical view of these times, for example the sum, min, max and mean. `stopwatch_accumulator<>` associates an accumulator with a stopwatch, so we are able to retrieve any statistical feature Boost.Accumulator provides.
-
For example
using namespace boost::chrono;
@@ -444,7 +443,7 @@
std::sqrt( 123.456L ); // burn some time
return 0;
- }
+ }
int main() {
f1(100000);
f1(200000);
@@ -456,28 +455,38 @@
3 times, sum 0.034s, min 0.006s, max 0.017s, mean 0.011s
-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.
+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.
__Boost_Chrono__ provides 3 concrete process clocks:
-# `process_real_CPU_clock`,
-# `process_user_CPU_clock`,
-# `process_system_CPU_clock`
+# `process_real_CPU_clock`,
+# `process_user_CPU_clock`,
+# `process_system_CPU_clock`
providing a thin wrappers around the operating system's process timer API. For POSIX-like systems, that's the times() function, while for Windows, it's the GetProcessTimes() function.
-These clocks capture the specific time unitarily. __Boost_Chrono__ provides also a pseudo-clock `process_clocks` that captures the three times at once. As `process_clocks` do not conform to the Stopwatch concept, As `stopwatch<process_clocks>` and `stopwatch_reporter<stopwatch<process_clocks> >` do not works, __Boost_Chrono__ provides the equivalent classes `process_stopwatches` and `process_stopwatches_reporter`
+These clocks capture the specific time unitarily. __Boost_Chrono__ provides also a clock `process_cpu_clock` that captures the three times at once.
using namespace boost::chrono;
int main()
{
- process_stopwatches_reporter _;
+ stopwatch_reporter<stopwatch<process_cpu_clock> > _;
// ...
}
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 common the library provides a stopclock shortcut so the preceding can be writen as
+
+ using namespace boost::chrono;
+ int main()
+ {
+ stopclock<> _;
+ // ...
+ }
+
[endsect]
[endsect]
@@ -663,9 +672,6 @@
[section Tutorial]
-[section Tutorial]
-
-[endsect]
[section thread clock]
@@ -685,7 +691,6 @@
}
};
-
[endsect]
[endsect]
@@ -923,7 +928,7 @@
struct ratio_less
: public boost::integral_constant<bool, [/see below] > {};
-If R1::num * R2::den < R2::num * R1::den, ratio_less derives from true_type, else derives from false_type.
+If R1::num * R2::den < R2::num * R1::den, ratio_less derives from true_type, else derives from false_type.
template <class R1, class R2> struct ratio_not_equal
: public boost::integral_constant<bool, !ratio_equal<R1, R2>::value> {};
@@ -1526,7 +1531,7 @@
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)
@@ -1827,7 +1832,7 @@
[section Class `system_clock`]
-The `system_clock` class provides a means of obtaining the current wall-clock time from the system-wide real-time clock. The current time can be obtained by calling `system_clock::now()`. Instances of `system_clock::time_point` can be converted to and from time_t with the `system_clock::to_time_t()` and `system_clock::to_time_point()` functions. If system clock is not monotonic, a subsequent call to `system_clock::now()` may return an earlier time than a previous call (e.g. if the operating system clock is manually adjusted, or synchronized with an external clock).
+The `system_clock` class provides a means of obtaining the current wall-clock time from the system-wide real-time clock. The current time can be obtained by calling `system_clock::now()`. Instances of `system_clock::time_point` can be converted to and from time_t with the `system_clock::to_time_t()` and `system_clock::to_time_point()` functions. If system clock is not monotonic, a subsequent call to `system_clock::now()` may return an earlier time than a previous call (e.g. if the operating system clock is manually adjusted, or synchronized with an external clock).
class system_clock {
public:
@@ -1924,7 +1929,7 @@
`process_real_cpu_clock` satisfy the Clock Requirements.
-`process_real_cpu_clock` class provides access to the real process wall-clock monotonic clock, i.e. the real CPU-time clock of the calling process. The process relative current time can be obtained by calling `process_real_cpu_clock::now()`.
+`process_real_cpu_clock` class provides access to the real process wall-clock monotonic clock, i.e. the real CPU-time clock of the calling process. The process relative current time can be obtained by calling `process_real_cpu_clock::now()`.
class process_real_cpu_clock {
public:
@@ -1943,7 +1948,7 @@
`process_user_cpu_clock` satisfy the Clock Requirements.
-`process_user_cpu_clock` class provides access to the user CPU-time monotonic clock of the calling process. The process relative user current time can be obtained by calling `process_user_cpu_clock::now()`.
+`process_user_cpu_clock` class provides access to the user CPU-time monotonic clock of the calling process. The process relative user current time can be obtained by calling `process_user_cpu_clock::now()`.
class process_user_cpu_clock {
public:
@@ -1963,7 +1968,7 @@
`process_system_cpu_clock` satisfy the Clock Requirements.
-`process_system_cpu_clock` class provides access to the system CPU-time monotonic clockof the calling process. The process relative system current time can be obtained by calling `process_system_cpu_clock::now()`.
+`process_system_cpu_clock` class provides access to the system CPU-time monotonic clockof the calling process. The process relative system current time can be obtained by calling `process_system_cpu_clock::now()`.
class process_system_cpu_clock {
public:
@@ -1981,11 +1986,11 @@
[section Class `process_cpu_clock`]
-`process_clocks` can be considered as a `tuple<process_real_cpu_clock, process_user_cpu_clock, process_system_cpu_clock>`.
+`process_clocks` can be considered as a `tuple<process_real_cpu_clock, process_user_cpu_clock, process_system_cpu_clock>`.
-`process_clocks` provides a thin wrapper around the operating system's process timer API. For POSIX-like systems, that's the times() function, while for Windows, it's the GetProcessTimes() function.
+`process_clocks` provides a thin wrapper around the operating system's process timer API. For POSIX-like systems, that's the times() function, while for Windows, it's the GetProcessTimes() function.
-The process relative real, user and system current time can be obtained at once by calling `process_clocks::now()`.
+The process relative real, user and system current time can be obtained at once by calling `process_clocks::now()`.
class BOOST_CHRONO_DECL process_cpu_clock
@@ -2017,7 +2022,7 @@
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
-
+
times();
times(
process_real_cpu_clock::rep r,
@@ -2025,7 +2030,7 @@
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);
@@ -2083,7 +2088,7 @@
duration stop( system::error_code & ec = system::throws );
-[*Effect:] Stops running the stopwatch.
+[*Effect:] Stops running the stopwatch.
[*Returns:] The cummulated elapsed time.
@@ -2094,7 +2099,7 @@
duration suspend( system::error_code & ec = system::throws );
-[*Effect:] Suspends the stopwatch.
+[*Effect:] Suspends the stopwatch.
[*Throw:] Any exception the Clock::now function can throw.
@@ -2103,7 +2108,7 @@
time_point resume( system::error_code & ec = system::throws );
-[*Effect:] Resumes the stopwatch.
+[*Effect:] Resumes the stopwatch.
[*Returns:] the starting time point.
@@ -2132,9 +2137,9 @@
namespace boost { namespace chrono {
struct dont_start_t;
static const dont_start_t dont_start;
-
+
template <class Clock=high_resolution_clock> class stopwatch;
-
+
typedef <see above> system_stopwatch;
#ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
typedef <see above> monotonic_stopwatch;
@@ -2149,7 +2154,7 @@
`stopwatch<>` is a model of a `Stopwatch`.
-Knowing how long a part of a program takes to execute is useful in both test and production environments.
+Knowing how long a part of a program takes to execute is useful in both test and production environments.
A `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
@@ -2174,11 +2179,11 @@
time_point resume( system::error_code & ec = system::throws );
duration elapsed( system::error_code & ec = system::throws );
-
+
typedef stopwatch_runner<stopwatch<Clock> > scoped_run;
typedef stopwatch_suspender<stopwatch<Clock> > scoped_suspend;
- typedef stopwatch_resumer<stopwatch<Clock> > scoped_resume;
- typedef stopwatch_reporter<stopwatch<Clock> > reporter;
+ typedef stopwatch_resumer<stopwatch<Clock> > scoped_resume;
+ typedef stopwatch_reporter<stopwatch<Clock> > reporter;
};
@@ -2203,7 +2208,7 @@
typedef boost::chrono::stopwatch< boost::chrono::monotonic_clock > monotonic_stopwatch;
#endif
typedef boost::chrono::stopwatch< boost::chrono::high_resolution_clock > high_resolution_stopwatch;
-
+
typedef boost::chrono::stopwatch< boost::chrono::process_real_cpu_clock > process_real_cpu_stopwatch;
typedef boost::chrono::stopwatch< boost::chrono::process_user_cpu_clock > process_user_cpu_stopwatch;
typedef boost::chrono::stopwatch< boost::chrono::process_system_cpu_clock > process_system_cpu_stopwatch;
@@ -2221,8 +2226,8 @@
#ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
typedef <see below> monotonic_stopwatch_accumulator;
#endif
- typedef <see below> high_resolution_stopwatch_accumulator;
-
+ typedef <see below> high_resolution_stopwatch_accumulator;
+
typedef <see below> process_real_cpu_stopwatch_accumulator;
typedef <see below> process_user_cpu_stopwatch_accumulator;
typedef <see below> process_system_cpu_stopwatch_accumulator;
@@ -2232,7 +2237,7 @@
[section Template Class `stopwatch_accumulator<>`]
-A `stopwatch_accumulator<>` is a model of a Stopwatch that allows to accumulate the time in several times instead of at once as it is the case of the class `stopwatch<>`.
+A `stopwatch_accumulator<>` is a model of a Stopwatch that allows to accumulate the time in several times instead of at once as it is the case of the class `stopwatch<>`.
template <class Clock> class stopwatch_accumulator {
public:
@@ -2246,19 +2251,19 @@
time_point start( system::error_code & ec = system::throws );
duration stop( system::error_code & ec = system::throws );
std::pair<duration,time_point> restart( system::error_code & ec = system::throws );
-
+
duration suspend( system::error_code & ec = system::throws );
time_point resume( system::error_code & ec = system::throws );
-
+
duration elapsed(system::error_code & ec = system::throws);
-
+
accumulator& accumulated( );
void reset();
-
+
typedef stopwatch_runner<stopwatch_accumulator<Clock> > scoped_run;
typedef stopwatch_suspender<stopwatch_accumulator<Clock> > scoped_suspend;
- typedef stopwatch_resumer<stopwatch_accumulator<Clock> > scoped_resume;
- typedef stopwatch_reporter<stopwatch_accumulator<Clock> > reporter;
+ typedef stopwatch_resumer<stopwatch_accumulator<Clock> > scoped_resume;
+ typedef stopwatch_reporter<stopwatch_accumulator<Clock> > reporter;
};
[section:stopwatch_accumulator_c Constructor `stopwatch_accumulator()`]
@@ -2303,7 +2308,7 @@
time_point resume( system::error_code & ec = system::throws );
-[*Effect:] Resumes the stopwatch.
+[*Effect:] Resumes the stopwatch.
[*Returns:] the starting time point.
@@ -2359,8 +2364,8 @@
#ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
typedef boost::chrono::stopwatch_accumulator< boost::chrono::monotonic_clock > monotonic_stopwatch_accumulator;
#endif
- typedef boost::chrono::stopwatch_accumulator< boost::chrono::high_resolution_clock > high_resolution_stopwatch_accumulator;
-
+ typedef boost::chrono::stopwatch_accumulator< boost::chrono::high_resolution_clock > high_resolution_stopwatch_accumulator;
+
typedef boost::chrono::stopwatch_accumulator< boost::chrono::process_real_cpu_clock > process_real_cpu_stopwatch_accumulator;
typedef boost::chrono::stopwatch_accumulator< boost::chrono::process_user_cpu_clock > process_user_cpu_stopwatch_accumulator;
typedef boost::chrono::stopwatch_accumulator< boost::chrono::process_system_cpu_clock > process_system_cpu_stopwatch_accumulator;
@@ -2378,7 +2383,7 @@
template <class Clock> class stopwatch_resumer;
}}
-Boost.Chrono provides some helper classes ensuring pairwised operations (start/stop, suspend/resume, resule/suspend).
+Boost.Chrono provides some helper classes ensuring pairwised operations (start/stop, suspend/resume, resule/suspend).
[section Template Class `stopwatch_runner<>`]
@@ -2425,9 +2430,9 @@
static stopwatch_accumulator<> t;
stopwatch_runner<stopwatch_accumulator<> > _(t);
// ...
-
+
// call to some function we don't want to measure
- {
+ {
stopwatch_suspender<stopwatch_accumulator<> > _(t);
external_function();
}
@@ -2456,14 +2461,14 @@
static stopwatch_accumulator<> t;
stopwatch_runner<stopwatch_accumulator<> > _(t);
// ...
-
+
// call to some function we don't want to measure
- {
+ {
stopwatch_suspender<stopwatch_accumulator<> > _(t);
-
+
{
stopwatch_resumer<stopwatch_accumulator<> > _(t);
-
+
}
}
}
@@ -2525,27 +2530,6 @@
]
[endsect]
[section Stopwatch Reporters]
-
-[/==================================================]
-[section:stopwatch_reporter_hpp Header `<boost/chrono/stopwatch_reporter.hpp>`]
-[/==================================================]
-
- namespace boost { namespace chrono {
- template <class Stopwatch>
- struct stopwatch_reporter_default_formatter;
-
- template <class Stopwatch, class Formatter=typename stopwatch_reporter_default_formatter<Stopwatch>::type>
- class stopwatch_reporter;
- typedef <see above> system_stopwatch_reporter;
- #ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
- typedef <see above> monotonic_stopwatch_reporter;
- #endif
- typedef <see above> high_resolution_stopwatch_reporter;
- typedef <see above> process_real_cpu_stopwatch_reporter;
- typedef <see above> process_user_cpu_stopwatch_reporter;
- typedef <see above> process_system_cpu_stopwatch_reporter;
- }}
-
[section `Formatter` Requirements]
A Formatter outputs on a given ostream a formatted string combining informations from a Stopwatch and the format and the double precission.
@@ -2566,7 +2550,7 @@
[section `Formatter` related traits]
- template <class Stopwatch>
+ template <class Stopwatch>
struct stopwatch_reporter_default_formatter {
typedef <see below> type;
};
@@ -2575,6 +2559,31 @@
[endsect]
+[/==================================================]
+[section:stopwatch_reporter_hpp Header `<boost/chrono/stopwatch_reporter.hpp>`]
+[/==================================================]
+
+ namespace boost { namespace chrono {
+ template <class Stopwatch>
+ struct stopwatch_reporter_default_formatter;
+
+ template <class Stopwatch, class Formatter=typename stopwatch_reporter_default_formatter<Stopwatch>::type>
+ class stopwatch_reporter;
+ }}
+
+[/
+ typedef <see above> system_stopwatch_reporter;
+ #ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
+ typedef <see above> monotonic_stopwatch_reporter;
+ #endif
+ typedef <see above> high_resolution_stopwatch_reporter;
+ typedef <see above> process_real_cpu_stopwatch_reporter;
+ typedef <see above> process_user_cpu_stopwatch_reporter;
+ typedef <see above> process_system_cpu_stopwatch_reporter;
+ typedef <see above> process_cpu_stopwatch_reporter;
+
+]
+
[section Template Class `stopwatch_reporter<>`]
class `stopwatch_reporter` provides a everything a Timer provides and it adds reporting capabilities that can be invoked in a single line of code. The reporting is controleed by two parameters:
@@ -2585,7 +2594,7 @@
The default places is given by Formatter::default_places.
The default format is given by Formatter::default_format.
- template <class Stopwatch, class Formatter>
+ template <class Stopwatch, class Formatter>
class stopwatch_reporter : public Stopwatch {
public:
explicit stopwatch_reporter( system::error_code & ec = system::throws );
@@ -2616,11 +2625,11 @@
void report( system::error_code & ec = system::throws );
bool reported() const;
-
-
+
+
typedef stopwatch_runner<stopwatch_reporter<Stopwatch> > scoped_run;
typedef stopwatch_suspender<stopwatch_reporter<Stopwatch> > scoped_suspend;
- typedef stopwatch_resumer<stopwatch_reporter<Stopwatch> > scoped_resume;
+ typedef stopwatch_resumer<stopwatch_reporter<Stopwatch> > scoped_resume;
};
Usage
@@ -2631,77 +2640,108 @@
static accumulator t;
accumulator::scoped_run _(t);
// ...
-
+
// call to some function we don't want to measure
- {
+ {
accumulator::scoped_suspend _(t);
external_function();
}
}
[endsect]
-
+[/
[section `stopwatch_reporter` useful typedefs]
- typedef boost::chrono::stopwatch_reporter< boost::chrono::system_clock > system_stopwatch_reporter;
+ typedef stopwatch_reporter< stopwatch<system_clock> > system_stopwatch_reporter;
#ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
- typedef boost::chrono::stopwatch_reporter< boost::chrono::monotonic_clock > monotonic_stopwatch_reporter;
+ typedef stopwatch_reporter< stopwatch<monotonic_clock> > monotonic_stopwatch_reporter;
#endif
- typedef boost::chrono::stopwatch_reporter< boost::chrono::high_resolution_clock > high_resolution_stopwatch_reporter;
- typedef boost::chrono::stopwatch_reporter< boost::chrono::process_real_cpu_clock > process_real_cpu_stopwatch_reporter;
- typedef boost::chrono::stopwatch_reporter< boost::chrono::process_user_cpu_clock > process_user_cpu_stopwatch_reporter;
- typedef boost::chrono::stopwatch_reporter< boost::chrono::process_system_cpu_clock > process_system_cpu_stopwatch_reporter;
+ typedef stopwatch_reporter< stopwatch<high_resolution_clock> > high_resolution_stopwatch_reporter;
+ typedef stopwatch_reporter< stopwatch<process_real_cpu_clock> > process_real_cpu_stopwatch_reporter;
+ typedef stopwatch_reporter< stopwatch<process_user_cpu_clock> > process_user_cpu_stopwatch_reporter;
+ typedef stopwatch_reporter< stopwatch<process_system_cpu_clock> > process_system_cpu_stopwatch_reporter;
+ typedef stopwatch_reporter< stopwatch<process_cpu_clock> > process_cpu_stopwatch_reporter;
[endsect]
-
+]
[endsect]
[/==================================================]
-[section:digital_time_hpp Header `<boost/chrono/digital_time.hpp>`]
+[section:stopclock_hpp Header `<boost/chrono/stopclock.hpp>`]
[/==================================================]
namespace boost { namespace chrono {
- class digital_time;
+ template
+ < class Clock=process_cpu_clock
+ , class Stopwatch=stopwatch<Clock>
+ , class Formatter=typename stopwatch_reporter_default_formatter<Stopwatch>::type
+ > class stopclock;
+ typedef <see above> system_stopclock;
+ #ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
+ typedef <see above> monotonic_stopclock;
+ #endif
+ typedef <see above> high_resolution_stopclock;
+ typedef <see above> process_real_cpu_stopclock;
+ typedef <see above> process_user_cpu_stopclock;
+ typedef <see above> process_system_cpu_stopclock;
}}
-[section Class `digital_time`]
+[section Template Class `stopclock<>`]
- class digital_time {
+`stopclock<Clock>` template class is a shortcut of `stopwatch_reporter<stopwatch<Clock>>`
+
+ template
+ < class Clock=process_cpu_clock
+ , class Stopwatch=stopwatch<Clock>
+ , class Formatter=typename stopwatch_reporter_default_formatter<Stopwatch>::type
+ > class stopclock : public stopwatch_reporter<Stopwatch, Formatter> {
public:
- typedef boost::chrono::duration<boost::int_least32_t, ratio<24*3600> > days;
- typedef boost::chrono::hours hours;
- typedef boost::chrono::minutes minutes;
- typedef boost::chrono::seconds seconds;
- typedef boost::chrono::nanoseconds nanoseconds;
+ explicit stopclock( system::error_code & ec = system::throws );
+ explicit stopclock( std::ostream & os,
+ system::error_code & ec = system::throws );
+ explicit stopclock( const std::string & format,
+ system::error_code & ec = system::throws );
+ explicit stopclock( int places,
+ system::error_code & ec = system::throws );
- days days_;
- hours hours_;
- minutes minutes_;
- seconds seconds_;
- nanoseconds nanoseconds_;
+ stopclock( std::ostream & os, const std::string & format,
+ system::error_code & ec = system::throws );
+ stopclock( const std::string & format, int places,
+ system::error_code & ec = system::throws );
+ stopclock( std::ostream & os, int places,
+ system::error_code & ec = system::throws );
+ stopclock( int places, const std::string & format,
+ system::error_code & ec = system::throws );
- template <class Rep, class Period>
- static days get_days(const boost::chrono::duration<Rep, Period>& d);
+ stopclock( std::ostream & os, const std::string & format, int places,
+ system::error_code & ec = system::throws );
+ stopclock( std::ostream & os, int places, const std::string & format,
+ system::error_code & ec = system::throws );
- template <class Rep, class Period>
- static hours get_hours(const boost::chrono::duration<Rep, Period>& d);
- template <class Rep, class Period>
- static minutes get_minutes(const boost::chrono::duration<Rep, Period>& d);
+ typedef typename base_type::scoped_run scoped_run;
+ typedef typename base_type::scoped_suspend scoped_suspend;
+ typedef typename base_type::scoped_resume scoped_resume;
+ };
- template <class Rep, class Period>
- static seconds get_seconds(const boost::chrono::duration<Rep, Period>& d);
+[endsect]
+[section `stopclock` useful typedefs]
- template <class Rep, class Period>
- static nanoseconds get_nanoseconds(const boost::chrono::duration<Rep, Period>& d);
-
- template <class Rep, class Period>
- explicit digital_time(const boost::chrono::duration<Rep, Period>& d);
- };
+ typedef boost::chrono::stopclock< boost::chrono::system_clock > system_stopwatch_reporter;
+ #ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
+ typedef boost::chrono::stopclock< boost::chrono::monotonic_clock > monotonic_stopwatch_reporter;
+ #endif
+ typedef boost::chrono::stopclock< boost::chrono::high_resolution_clock > high_resolution_stopclock;
+ typedef boost::chrono::stopclock< boost::chrono::process_real_cpu_clock > process_real_cpu_stopclock;
+ typedef boost::chrono::stopclock< boost::chrono::process_user_cpu_clock > process_user_cpu_stopclock;
+ typedef boost::chrono::stopclock< boost::chrono::process_system_cpu_clock > process_system_cpu_stopclock;
[endsect]
[endsect]
+[endsect]
+[section Stopwatch Formatters]
+
[/==================================================]
[section:stopwatch_formatter_hpp Header `<boost/chrono/stopwatch_formatter.hpp>`]
[/==================================================]
@@ -2721,12 +2761,12 @@
static const char * default_format;
static int default_places() { return m_default_places; }
- template < class Stopwatch >
+ template < class Stopwatch >
static void show_time( Stopwatch & stopwatch_, const char * format, int places, std::ostream & os, system::error_code & ec);
};
-
+
The default places is given by default_places and is 3.
-The default format is "\\n%ts\\n", where
+The default format is "\\n%ts\\n", where
* `%d` : the result of elapsed() when the reporting is done.
@@ -2754,12 +2794,12 @@
static const char * default_format;
static int default_places() { return m_default_places; }
- template <class Stopwatch >
+ template <class Stopwatch >
static void show_time( Stopwatch & stopwatch_, const char * format, int places, std::ostream & os, system::error_code & ec);
};
-
+
The default places is given by default_places and is 3.
-The default format is "\\n"Count=%c times Sum=%ss Min=%ms Max=%Ms Mean=%as\\n", where
+The default format is "\\n"Count=%c times Sum=%ss Min=%ms Max=%Ms Mean=%as\\n", where
* `%c` : the counter of the number of times the pair srat/stop has been called.
* `%s` : the sum of the samples of elapsed time between the call to start/stop.
@@ -2773,7 +2813,7 @@
[endsect]
-[
+[/
[/==================================================================]
[section:process_process_stopwatches_reporter_hpp Header `<boost/chrono/process_stopwatches_reporter.hpp>`]
[/==================================================================]
@@ -2795,7 +2835,7 @@
* places(precission): the number of decimal placess used.
The default places is given by default_places and is 3.
-The default format is "\\nreal %rs, cpu %cs (%p%), user %us, system %ss\\n", where
+The default format is "\\nreal %rs, cpu %cs (%p%), user %us, system %ss\\n", where
* `%r` : real process clock
* `%u` : user process clock
@@ -2868,14 +2908,14 @@
static const char * default_format;
static int default_places() { return m_default_places; }
- template <class Stopwatch >
+ template <class Stopwatch >
static void show_time( Stopwatch & stopwatch_
, const char * format, int places, std::ostream & os
, system::error_code & ec);
- };
+ };
The default places is given by default_places and is 3.
-The default format is "\\nreal %rs, cpu %cs (%p%), user %us, system %ss\\n", where
+The default format is "\\nreal %rs, cpu %cs (%p%), user %us, system %ss\\n", where
* `%r` : real process clock
* `%u` : user process clock
@@ -2889,6 +2929,37 @@
[endsect]
+[/==================================================]
+[section:digital_time_hpp Header `<boost/chrono/digital_time.hpp>`]
+[/==================================================]
+
+ namespace boost { namespace chrono {
+ class digital_time;
+ }}
+
+[section Class `digital_time`]
+
+ class digital_time {
+ public:
+ typedef boost::chrono::duration<boost::int_least32_t, ratio<24*3600> > days;
+ typedef boost::chrono::hours hours;
+ typedef boost::chrono::minutes minutes;
+ typedef boost::chrono::seconds seconds;
+ typedef boost::chrono::nanoseconds nanoseconds;
+
+ days days_;
+ hours hours_;
+ minutes minutes_;
+ seconds seconds_;
+ nanoseconds nanoseconds_;
+
+ template <class Rep, class Period>
+ explicit digital_time(const boost::chrono::duration<Rep, Period>& d);
+ };
+
+[endsect]
+[endsect]
+
[/==================================================================]
[section:digital_time_formatter_hpp Header `<boost/chrono/digital_time_formatter.hpp>`]
[/==================================================================]
@@ -2909,16 +2980,16 @@
static const char * default_format;
static int default_places() { return m_default_places; }
- template <class Stopwatch >
+ template <class Stopwatch >
static void show_time( Stopwatch & stopwatch_
, const char * format, int places, std::ostream & os
, system::error_code & ec);
- };
+ };
The default places is given by default_places and is 3.
-The default format is "\\n%d days(s) %h:%m:%s.%n\\n", where
+The default format is "\\n%d days(s) %h:%m:%s.%n\\n", where
-* `%d` : days
+* `%d` : days
* `%h` : hours
* `%m` : minutes
* `%s` : seconds
@@ -2929,12 +3000,12 @@
[endsect]
[endsect]
-[section Deprecated Headers]
+[section Deprecated Headers]
[/==================================================]
[section:timer_hpp Deprecated Header `<boost/chrono/timer.hpp>`]
[/==================================================]
-This header has been replaced by the header <boost/chrono/stopwatch.hpp>.
+This header has been deprecated, use instead <boost/chrono/stopwatch.hpp>.
namespace boost { namespace chrono {
template <class Clock=high_resolution_clock> class timer;
@@ -2952,7 +3023,7 @@
]
[section Template Class `timer<>`]
-Knowing how long a part of a program takes to execute is useful in both test and production environments.
+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
@@ -2982,8 +3053,8 @@
typedef boost::chrono::timer< boost::chrono::monotonic_clock > monotonic_timer;
#endif
typedef boost::chrono::timer< boost::chrono::high_resolution_clock > high_resolution_timer;
-
-[/
+
+[/
typedef boost::chrono::timer< boost::chrono::process_real_cpu_clock > process_real_cpu_timer;
typedef boost::chrono::timer< boost::chrono::process_user_cpu_clock > process_user_cpu_timer;
typedef boost::chrono::timer< boost::chrono::process_system_cpu_clock > process_system_cpu_timer;
@@ -2996,7 +3067,7 @@
[section:process_times_hpp Deprecated Header `<boost/chrono/process_times.hpp>`]
[/==================================================================]
-This header has been deprecated. See the `<boost/chrono/process_clocks.hpp>`, `<boost/chrono/process_stopwatches.hpp>` and `<boost/chrono/process_stopwatches_reporter.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 {
@@ -3011,9 +3082,9 @@
`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 timer API. For POSIX-like systems, that's the times() function, while for Windows, it's the GetProcessTimes() function.
+`process_clock` provides a thin wrapper around the operating system's process timer API. For POSIX-like systems, that's the times() function, while for Windows, it's the GetProcessTimes() function.
-The process relative real, user and system current time can be obtained at once by calling `process_clock::now()`.
+The process relative real, user and system current time can be obtained at once by calling `process_clock::now()`.
class process_clock {
@@ -3043,7 +3114,7 @@
[section Typedef `process_times`]
typedef process_clock::process_times process_times;
-
+
This is a synonym of process_clock::process_times included for backward compatibility.
[endsect]
@@ -3076,7 +3147,7 @@
* places(precission): the number of decimal placess used.
The default places is given by default_places and is 3.
-The default format is "\\nreal %rs, cpu %cs (%p%), user %us, system %ss\\n", where
+The default format is "\\nreal %rs, cpu %cs (%p%), user %us, system %ss\\n", where
* `%r` : real process clock
* `%u` : user process clock
@@ -3188,7 +3259,7 @@
Need a floating point definition of seconds
typedef boost::chrono::duration<double> seconds; // unity
-
+
Demo of (scientific) support for sub-nanosecond resolutions
typedef boost::chrono::duration<double, boost::pico> picosecond; // 10^-12 seconds
@@ -3260,7 +3331,7 @@
quantity<typename boost::ratio_subtract<R1, R3>::type, typename boost::ratio_subtract<R2, R4>::type>
operator/(const quantity<R1, R2>& x, const quantity<R3, R4>& y)
{
- typedef quantity<typename boost::ratio_subtract<R1, R3>::type,
+ typedef quantity<typename boost::ratio_subtract<R1, R3>::type,
typename boost::ratio_subtract<R2, R4>::type> R;
R r;
r.set(x.get() / y.get());
@@ -3271,7 +3342,7 @@
quantity<typename boost::ratio_add<R1, R3>::type, typename boost::ratio_add<R2, R4>::type>
operator*(const quantity<R1, R2>& x, const quantity<R3, R4>& y)
{
- typedef quantity<typename boost::ratio_add<R1, R3>::type,
+ typedef quantity<typename boost::ratio_add<R1, R3>::type,
typename boost::ratio_add<R2, R4>::type> R;
R r;
r.set(x.get() * y.get());
@@ -3316,23 +3387,23 @@
{
typedef boost::ratio<8, BOOST_INTMAX_C(0x7FFFFFFFD)> R1;
typedef boost::ratio<3, BOOST_INTMAX_C(0x7FFFFFFFD)> R2;
- typedef User1::quantity<boost::ratio_subtract<boost::ratio<0>, boost::ratio<1> >::type,
+ typedef User1::quantity<boost::ratio_subtract<boost::ratio<0>, boost::ratio<1> >::type,
boost::ratio_subtract<boost::ratio<1>, boost::ratio<0> >::type > RR;
typedef boost::ratio_subtract<R1, R2>::type RS;
std::cout << RS::num << '/' << RS::den << '\n';
-
-
+
+
std::cout << "*************\n";
std::cout << "* testUser1 *\n";
std::cout << "*************\n";
User1::Distance d( User1::mile(110) );
User1::Time t( boost::chrono::hours(2) );
-
+
RR r=d / t;
//r.set(d.get() / t.get());
-
+
User1::Speed rc= r;
-
+
User1::Speed s = d / t;
std::cout << "Speed = " << s.get() << " meters/sec\n";
User1::Acceleration a = User1::Distance( User1::foot(32.2) ) / User1::Time() / User1::Time();
@@ -3369,7 +3440,7 @@
Next follows how you override the duration's default constructor to do anything you want (in this case zero). All we need to do is to change the representation
namespace I_dont_like_the_default_duration_behavior {
-
+
template <class R>
class zero_default
{
@@ -3418,7 +3489,7 @@
Usage
using namespace I_dont_like_the_default_duration_behavior;
-
+
milliseconds ms;
std::cout << ms.count() << '\n';
@@ -3620,7 +3691,7 @@
tv_sec = static_cast<long>(usec / 1000000);
fixup();
}
-
+
// explicit
operator long long() const {return static_cast<long long>(tv_sec) * 1000000 + tv_usec;}
@@ -3673,7 +3744,7 @@
{return os << '{' << x.tv_sec << ',' << x.tv_usec << '}';}
};
-Clock based on timeval-like struct.
+Clock based on timeval-like struct.
class xtime_clock
{
@@ -3704,8 +3775,8 @@
xtime xt( ts.tv_sec, ts.tv_nsec/1000);
return time_point(duration(xt));
-
- #endif // POSIX
+
+ #endif // POSIX
}
};
@@ -3833,7 +3904,7 @@
namespace boost {
struct timed_mutex {
// ...
-
+
template <class Rep, class Period>
bool try_lock_for(const boost::chrono::duration<Rep, Period>& d) {
boost::chrono::microseconds t = boost::chrono::duration_cast<boost::chrono::microseconds>(d);
@@ -3871,7 +3942,7 @@
struct condition_variable
{
// ...
-
+
template <class Rep, class Period>
bool wait_for(mutex&, const boost::chrono::duration<Rep, Period>& d) {
boost::chrono::microseconds t = boost::chrono::duration_cast<boost::chrono::microseconds>(d);
@@ -3900,7 +3971,7 @@
};
}
-Usage
+Usage
boost::mutex m;
boost::timed_mutex mut;
@@ -3908,12 +3979,12 @@
using namespace boost;
using namespace boost::chrono;
-
+
this_thread::sleep_for(seconds(3));
this_thread::sleep_for(nanoseconds(300));
- system_clock::time_point time_limit = system_clock::now() + seconds(4) + milliseconds(500);
+ system_clock::time_point time_limit = system_clock::now() + seconds(4) + milliseconds(500);
this_thread::sleep_until(time_limit);
-
+
mut.try_lock_for(milliseconds(30));
mut.try_lock_until(time_limit);
@@ -4008,7 +4079,7 @@
std::cout << "high_resolution_clock latency--: " << (d9 - d8).count() << std::endl;
std::time_t now = system_clock::to_time_t(system_clock::now());
-
+
std::cout << "\nsystem_clock::now() reports UTC is "
<< std::asctime(std::gmtime(&now)) << "\n";
@@ -4137,8 +4208,8 @@
[section:history Appendix A: History]
[/==================================]
-[section [*Version 0.3.0, January 9, 2010] ['New stopwatch feature + Bug fixes]]
-[*Features:]
+[section [*Version 0.3.0, January 15, 2010] ['New stopwatch/stopclock feature + Bug fixes]]
+[*Features:]
* Added independent process cpu clocks for real, user, system process CPU time
* Added global process cpu clock for real, user, system process CPU time
@@ -4152,11 +4223,12 @@
* Added stopwatch accumulator formatter "%c times, sum=%ss, min=%ms, max=%Ms, mean=%as"
* Added time formatter "real %rs, cpu %cs (%p%), user %us, system %ss"
* Added digital_time formatter "%d days(s) %h:%m:%s.%n"
-* stopwatch_reporter is a convenient generic class reporting elapsed time for the Stopwatch concept.
+* stopwatch_reporter is a convenient generic class reporting elapsed time for the Stopwatch concept.
+* Added stopclock<Clock> shortcut stopwatch_reporter<stopwatch<Clcok>>
* The old classes process_times, process_clock, process_timer, timer and run_timer are deprecated as the preceding additions are more generic. However for backward compatibility they preserved until inclusion of the library in Boost. Next follows the equivalences:
* timer<> ~ stopwatch<>
* process_timer ~ stopwatch<process_cpu_clock>
- * run_timer ~ stopwatch_reporter<stopwatch<process_cpu_clock>, time_formatter>
+ * run_timer ~ stopclock<>
[*Bug Fixes]
@@ -4168,7 +4240,7 @@
[*Bug Fixes]
-* Replace INTMAX_C by BOOST_INTMAX_C until boost/cstdint;hpp ensures INTMAX_C is always defined.
+* Replace INTMAX_C by BOOST_INTMAX_C until boost/cstdint;hpp ensures INTMAX_C is always defined.
* Define BOOST_CHRONO_HAS_CLOCK_MONOTONIC when BOOST_CHRONO_WINDOWS_API
* Commenting invalid operator declarations
* Take care of Boost min/max recommendations
@@ -4181,7 +4253,7 @@
* warning removal on posix/process_clock.cpp
* disable VC++ foolishness
* Update Jamfiles to manage with dll
-* removal of conversion warning in test_duration
+* removal of conversion warning in test_duration
* manage with MSVC reporting a warning instead of an error when there is an integral constant overflow
* Use STATIC_ASSERT specific macro to solve the compile failing issue
* Qualify with boost::detail boost::chrono::detail to avoid ambiguities with MSVC
@@ -4195,14 +4267,14 @@
[section [*Version 0.2.0, December 8, 2009] ['+ Features + Bug fixes + Updated documentation]]
-[*Features:]
+[*Features:]
* Added ratio construction and assignment from an equivalent ratio ([@http://home.roadrunner.com/~hinnant/issue_review/lwg-active.html#1281 [*LWG 1281. CopyConstruction and Assignment between ratios having the same normalized form]])
* Added nested ratio typedef type ([@http://home.roadrunner.com/~hinnant/issue_review/lwg-active.html#1281 [*LWG 1281. CopyConstruction and Assignment between ratios having the same normalized form]])
* Added BOOST_CHRONO_HAS_CLOCK_MONOTONIC macro to state if monotonic_clock is provided on this platform.
* Added duration operator% ([@http://home.roadrunner.com/~hinnant/issue_review/lwg-defects.html#934 [*LGW 934. duration is missing operator%]])
* Added BOOST_CONSTEXPR when constexpr should be used
-* Complete duration operator* and operator/
+* Complete duration operator* and operator/
[*Implementation:]
@@ -4220,7 +4292,7 @@
[*Bug Fixes]
-* operator/ was ambiguous: Disambiguate duration operator/
+* operator/ was ambiguous: Disambiguate duration operator/
* CLOCK_MONOTONIC is not defined with cygwin/gcc 3.4: Disable code when BOOST_CHRONO_HAS_CLOCK_MONOTONIC is not defined.
* result of metafunctions ratio_multiply and ratio_divide were not normalized ratios: Use of the nested ratio typedef type on ratio arithmetic operations.
* Copy constructor from similar duration masked the defaulted operations: Added duration defaulted implementations
@@ -4312,7 +4384,7 @@
The meaning of synonym let think that the result should be a normalized ratio equivalent to ratio<T1, T2>, but there is not an explicit definition of what synonym means in this context.
-If the CopyConstruction and Assignment ([[@http://home.roadrunner.com/~hinnant/issue_review/lwg-active.html#12811281 [*LWG 1281]]) is not added we need a typedef for accessing the normalized ratio, and change 20.4.2 to return only this normalized result. In this case the user will need to
+If the CopyConstruction and Assignment ([[@http://home.roadrunner.com/~hinnant/issue_review/lwg-active.html#12811281 [*LWG 1281]]) is not added we need a typedef for accessing the normalized ratio, and change 20.4.2 to return only this normalized result. In this case the user will need to
ratio<1,3>::type r1;
ratio<3,9>::type r2;
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices.html 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -29,7 +29,7 @@
<div class="toc"><dl>
<dt><span class="section"> Appendix A: History</span></dt>
<dd><dl>
-<dt><span class="section"><a href="appendices/history.html#boost_chrono.appendices.history.__version_0_3_0__january_9__2010____new_stopwatch_feature___bug_fixes_"><span class="bold"><strong>Version 0.3.0, January 9, 2010</strong></span> <span class="emphasis"><em>New stopwatch
+<dt><span class="section"><a href="appendices/history.html#boost_chrono.appendices.history.__version_0_3_0__january_15__2010____new_stopwatch_stopclock_feature___bug_fixes_"><span class="bold"><strong>Version 0.3.0, January 15, 2010</strong></span> <span class="emphasis"><em>New stopwatch/stopclock
feature + Bug fixes</em></span></a></span></dt>
<dt><span class="section">Version 0.2.1, December 13, 2009 Bug fixes</span></dt>
<dt><span class="section"><a href="appendices/history.html#boost_chrono.appendices.history.__version_0_2_0__december_8__2009______features___bug_fixes___updated_documentation_"><span class="bold"><strong>Version 0.2.0, December 8, 2009</strong></span> <span class="emphasis"><em>+ Features
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/history.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/history.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/history.html 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -27,7 +27,7 @@
<a name="boost_chrono.appendices.history"></a> Appendix A: History
</h3></div></div></div>
<div class="toc"><dl>
-<dt><span class="section"><a href="history.html#boost_chrono.appendices.history.__version_0_3_0__january_9__2010____new_stopwatch_feature___bug_fixes_"><span class="bold"><strong>Version 0.3.0, January 9, 2010</strong></span> <span class="emphasis"><em>New stopwatch
+<dt><span class="section"><a href="history.html#boost_chrono.appendices.history.__version_0_3_0__january_15__2010____new_stopwatch_stopclock_feature___bug_fixes_"><span class="bold"><strong>Version 0.3.0, January 15, 2010</strong></span> <span class="emphasis"><em>New stopwatch/stopclock
feature + Bug fixes</em></span></a></span></dt>
<dt><span class="section">Version 0.2.1, December 13, 2009 Bug fixes</span></dt>
<dt><span class="section"><a href="history.html#boost_chrono.appendices.history.__version_0_2_0__december_8__2009______features___bug_fixes___updated_documentation_"><span class="bold"><strong>Version 0.2.0, December 8, 2009</strong></span> <span class="emphasis"><em>+ Features
@@ -37,8 +37,8 @@
</dl></div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_chrono.appendices.history.__version_0_3_0__january_9__2010____new_stopwatch_feature___bug_fixes_"></a><a href="history.html#boost_chrono.appendices.history.__version_0_3_0__january_9__2010____new_stopwatch_feature___bug_fixes_" title="Version 0.3.0, January 9, 2010 New stopwatch
- feature + Bug fixes"><span class="bold"><strong>Version 0.3.0, January 9, 2010</strong></span> <span class="emphasis"><em>New stopwatch
+<a name="boost_chrono.appendices.history.__version_0_3_0__january_15__2010____new_stopwatch_stopclock_feature___bug_fixes_"></a><a href="history.html#boost_chrono.appendices.history.__version_0_3_0__january_15__2010____new_stopwatch_stopclock_feature___bug_fixes_" title="Version 0.3.0, January 15, 2010 New stopwatch/stopclock
+ feature + Bug fixes"><span class="bold"><strong>Version 0.3.0, January 15, 2010</strong></span> <span class="emphasis"><em>New stopwatch/stopclock
feature + Bug fixes</em></span></a>
</h4></div></div></div>
<p>
@@ -96,6 +96,9 @@
for the Stopwatch concept.
</li>
<li>
+ Added stopclock<Clock> shortcut stopwatch_reporter<stopwatch<Clcok>>
+ </li>
+<li>
The old classes process_times, process_clock, process_timer, timer and
run_timer are deprecated as the preceding additions are more generic.
However for backward compatibility they preserved until inclusion of
@@ -108,8 +111,7 @@
process_timer ~ stopwatch<process_cpu_clock>
</li>
<li>
- run_timer ~ stopwatch_reporter<stopwatch<process_cpu_clock>,
- time_formatter>
+ run_timer ~ stopclock<>
</li>
</ul></div>
</li>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/implementation.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/implementation.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/implementation.html 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -31,7 +31,7 @@
Implementation Notes</a>
</h3></div></div></div>
<a name="boost_chrono.appendices.implementation.why_does_process_stopwatches_reporter_only_display_millisecond_place_precision_when_the_underlying_timer_has_nanosecond_precision_"></a><h4>
-<a name="id4904654"></a>
+<a name="id4903984"></a>
<a href="implementation.html#boost_chrono.appendices.implementation.why_does_process_stopwatches_reporter_only_display_millisecond_place_precision_when_the_underlying_timer_has_nanosecond_precision_">Why
does process_stopwatches_reporter only display millisecond place precision
when the underlying timer has nanosecond precision?</a>
@@ -42,7 +42,7 @@
dangerously.
</p>
<a name="boost_chrono.appendices.implementation.why_does_process_stopwatches_reporter_sometimes_report_more_cpu_seconds_than_real_seconds_"></a><h4>
-<a name="id4904693"></a>
+<a name="id4904023"></a>
<a href="implementation.html#boost_chrono.appendices.implementation.why_does_process_stopwatches_reporter_sometimes_report_more_cpu_seconds_than_real_seconds_">Why
does process_stopwatches_reporter sometimes report more cpu seconds than
real seconds?</a>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/rationale.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/rationale.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/rationale.html 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -33,7 +33,7 @@
are an extract from this document.
</p>
<a name="boost_chrono.appendices.rationale.is_it_possible_for_the_user_to_pass_a__code__phrase_role__identifier__duration__phrase___code__to_a_function_with_the_units_being_ambiguous_"></a><h4>
-<a name="id4903461"></a>
+<a name="id4902790"></a>
<a href="rationale.html#boost_chrono.appendices.rationale.is_it_possible_for_the_user_to_pass_a__code__phrase_role__identifier__duration__phrase___code__to_a_function_with_the_units_being_ambiguous_">Is
it possible for the user to pass a <code class="computeroutput"><span class="identifier">duration</span></code>
to a function with the units being ambiguous?</a>
@@ -45,7 +45,7 @@
<pre class="programlisting"><span class="identifier">f</span><span class="special">(</span><span class="number">3</span><span class="special">);</span> <span class="comment">// Will not compile, 3 is not implicitly convertible to any `duration`
</span></pre>
<a name="boost_chrono.appendices.rationale.why_duration_needs_operator_"></a><h4>
-<a name="id4903550"></a>
+<a name="id4902879"></a>
<a href="rationale.html#boost_chrono.appendices.rationale.why_duration_needs_operator_">Why
duration needs operator%</a>
</h4>
@@ -73,7 +73,7 @@
<span class="special">};</span>
</pre>
<a name="boost_chrono.appendices.rationale.why_ratio_needs_copyconstruction_and_assignment_from_ratios_having_the_same_normalized_form"></a><h4>
-<a name="id4904130"></a>
+<a name="id4903459"></a>
<a href="rationale.html#boost_chrono.appendices.rationale.why_ratio_needs_copyconstruction_and_assignment_from_ratios_having_the_same_normalized_form">Why
ratio needs CopyConstruction and Assignment from ratios having the same normalized
form</a>
@@ -101,7 +101,7 @@
ratio<1,3> and the compilation succeeds.
</p>
<a name="boost_chrono.appendices.rationale.why_ratio_needs_the_nested_normalizer_typedef_type"></a><h4>
-<a name="id4904442"></a>
+<a name="id4903772"></a>
<a href="rationale.html#boost_chrono.appendices.rationale.why_ratio_needs_the_nested_normalizer_typedef_type">Why
ratio needs the nested normalizer typedef type</a>
</h4>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/todo.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/todo.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/appendices/todo.html 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -27,7 +27,7 @@
<a name="boost_chrono.appendices.todo"></a> Appendix F: Future plans
</h3></div></div></div>
<a name="boost_chrono.appendices.todo.tasks_to_do_before_review"></a><h4>
-<a name="id4905367"></a>
+<a name="id4904696"></a>
<a href="todo.html#boost_chrono.appendices.todo.tasks_to_do_before_review">Tasks
to do before review</a>
</h4>
@@ -60,7 +60,7 @@
<span class="identifier">high</span> <span class="identifier">resolution</span> <span class="identifier">timers</span> <span class="identifier">to</span> <span class="identifier">avoid</span> <span class="identifier">these</span> <span class="identifier">issues</span><span class="special">.</span>
</pre>
<a name="boost_chrono.appendices.todo.for_later_releases"></a><h4>
-<a name="id4905970"></a>
+<a name="id4905300"></a>
<a href="todo.html#boost_chrono.appendices.todo.for_later_releases">For later
releases</a>
</h4>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/examples/a_tiny_program_that_times_how_long_until_a_key_is_struck.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/examples/a_tiny_program_that_times_how_long_until_a_key_is_struck.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/examples/a_tiny_program_that_times_how_long_until_a_key_is_struck.html 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -88,7 +88,7 @@
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"high_resolution_clock latency--: "</span> <span class="special"><<</span> <span class="special">(</span><span class="identifier">d9</span> <span class="special">-</span> <span class="identifier">d8</span><span class="special">).</span><span class="identifier">count</span><span class="special">()</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">time_t</span> <span class="identifier">now</span> <span class="special">=</span> <span class="identifier">system_clock</span><span class="special">::</span><span class="identifier">to_time_t</span><span class="special">(</span><span class="identifier">system_clock</span><span class="special">::</span><span class="identifier">now</span><span class="special">());</span>
-
+
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"\nsystem_clock::now() reports UTC is "</span>
<span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">asctime</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">gmtime</span><span class="special">(&</span><span class="identifier">now</span><span class="special">))</span> <span class="special"><<</span> <span class="string">"\n"</span><span class="special">;</span>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/examples/si_units.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/examples/si_units.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/examples/si_units.html 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -158,7 +158,7 @@
<span class="identifier">quantity</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio_subtract</span><span class="special"><</span><span class="identifier">R1</span><span class="special">,</span> <span class="identifier">R3</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio_subtract</span><span class="special"><</span><span class="identifier">R2</span><span class="special">,</span> <span class="identifier">R4</span><span class="special">>::</span><span class="identifier">type</span><span class="special">></span>
<span class="keyword">operator</span><span class="special">/(</span><span class="keyword">const</span> <span class="identifier">quantity</span><span class="special"><</span><span class="identifier">R1</span><span class="special">,</span> <span class="identifier">R2</span><span class="special">>&</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">quantity</span><span class="special"><</span><span class="identifier">R3</span><span class="special">,</span> <span class="identifier">R4</span><span class="special">>&</span> <span class="identifier">y</span><span class="special">)</span>
<span class="special">{</span>
- <span class="keyword">typedef</span> <span class="identifier">quantity</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio_subtract</span><span class="special"><</span><span class="identifier">R1</span><span class="special">,</span> <span class="identifier">R3</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span>
+ <span class="keyword">typedef</span> <span class="identifier">quantity</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio_subtract</span><span class="special"><</span><span class="identifier">R1</span><span class="special">,</span> <span class="identifier">R3</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span>
<span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio_subtract</span><span class="special"><</span><span class="identifier">R2</span><span class="special">,</span> <span class="identifier">R4</span><span class="special">>::</span><span class="identifier">type</span><span class="special">></span> <span class="identifier">R</span><span class="special">;</span>
<span class="identifier">R</span> <span class="identifier">r</span><span class="special">;</span>
<span class="identifier">r</span><span class="special">.</span><span class="identifier">set</span><span class="special">(</span><span class="identifier">x</span><span class="special">.</span><span class="identifier">get</span><span class="special">()</span> <span class="special">/</span> <span class="identifier">y</span><span class="special">.</span><span class="identifier">get</span><span class="special">());</span>
@@ -169,7 +169,7 @@
<span class="identifier">quantity</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio_add</span><span class="special"><</span><span class="identifier">R1</span><span class="special">,</span> <span class="identifier">R3</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio_add</span><span class="special"><</span><span class="identifier">R2</span><span class="special">,</span> <span class="identifier">R4</span><span class="special">>::</span><span class="identifier">type</span><span class="special">></span>
<span class="keyword">operator</span><span class="special">*(</span><span class="keyword">const</span> <span class="identifier">quantity</span><span class="special"><</span><span class="identifier">R1</span><span class="special">,</span> <span class="identifier">R2</span><span class="special">>&</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">quantity</span><span class="special"><</span><span class="identifier">R3</span><span class="special">,</span> <span class="identifier">R4</span><span class="special">>&</span> <span class="identifier">y</span><span class="special">)</span>
<span class="special">{</span>
- <span class="keyword">typedef</span> <span class="identifier">quantity</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio_add</span><span class="special"><</span><span class="identifier">R1</span><span class="special">,</span> <span class="identifier">R3</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span>
+ <span class="keyword">typedef</span> <span class="identifier">quantity</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio_add</span><span class="special"><</span><span class="identifier">R1</span><span class="special">,</span> <span class="identifier">R3</span><span class="special">>::</span><span class="identifier">type</span><span class="special">,</span>
<span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio_add</span><span class="special"><</span><span class="identifier">R2</span><span class="special">,</span> <span class="identifier">R4</span><span class="special">>::</span><span class="identifier">type</span><span class="special">></span> <span class="identifier">R</span><span class="special">;</span>
<span class="identifier">R</span> <span class="identifier">r</span><span class="special">;</span>
<span class="identifier">r</span><span class="special">.</span><span class="identifier">set</span><span class="special">(</span><span class="identifier">x</span><span class="special">.</span><span class="identifier">get</span><span class="special">()</span> <span class="special">*</span> <span class="identifier">y</span><span class="special">.</span><span class="identifier">get</span><span class="special">());</span>
@@ -215,23 +215,23 @@
<span class="special">{</span>
<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio</span><span class="special"><</span><span class="number">8</span><span class="special">,</span> <span class="identifier">BOOST_INTMAX_C</span><span class="special">(</span><span class="number">0</span><span class="identifier">x7FFFFFFFD</span><span class="special">)></span> <span class="identifier">R1</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio</span><span class="special"><</span><span class="number">3</span><span class="special">,</span> <span class="identifier">BOOST_INTMAX_C</span><span class="special">(</span><span class="number">0</span><span class="identifier">x7FFFFFFFD</span><span class="special">)></span> <span class="identifier">R2</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">User1</span><span class="special">::</span><span class="identifier">quantity</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio_subtract</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio</span><span class="special"><</span><span class="number">0</span><span class="special">>,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio</span><span class="special"><</span><span class="number">1</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span><span class="special">,</span>
+ <span class="keyword">typedef</span> <span class="identifier">User1</span><span class="special">::</span><span class="identifier">quantity</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio_subtract</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio</span><span class="special"><</span><span class="number">0</span><span class="special">>,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio</span><span class="special"><</span><span class="number">1</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span><span class="special">,</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio_subtract</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio</span><span class="special"><</span><span class="number">1</span><span class="special">>,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio</span><span class="special"><</span><span class="number">0</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span> <span class="special">></span> <span class="identifier">RR</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ratio_subtract</span><span class="special"><</span><span class="identifier">R1</span><span class="special">,</span> <span class="identifier">R2</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">RS</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">RS</span><span class="special">::</span><span class="identifier">num</span> <span class="special"><<</span> <span class="char">'/'</span> <span class="special"><<</span> <span class="identifier">RS</span><span class="special">::</span><span class="identifier">den</span> <span class="special"><<</span> <span class="char">'\n'</span><span class="special">;</span>
-
-
+
+
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"*************\n"</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"* testUser1 *\n"</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"*************\n"</span><span class="special">;</span>
<span class="identifier">User1</span><span class="special">::</span><span class="identifier">Distance</span> <span class="identifier">d</span><span class="special">(</span> <span class="identifier">User1</span><span class="special">::</span><span class="identifier">mile</span><span class="special">(</span><span class="number">110</span><span class="special">)</span> <span class="special">);</span>
<span class="identifier">User1</span><span class="special">::</span><span class="identifier">Time</span> <span class="identifier">t</span><span class="special">(</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">hours</span><span class="special">(</span><span class="number">2</span><span class="special">)</span> <span class="special">);</span>
-
+
<span class="identifier">RR</span> <span class="identifier">r</span><span class="special">=</span><span class="identifier">d</span> <span class="special">/</span> <span class="identifier">t</span><span class="special">;</span>
<span class="comment">//r.set(d.get() / t.get());
-</span>
+</span>
<span class="identifier">User1</span><span class="special">::</span><span class="identifier">Speed</span> <span class="identifier">rc</span><span class="special">=</span> <span class="identifier">r</span><span class="special">;</span>
-
+
<span class="identifier">User1</span><span class="special">::</span><span class="identifier">Speed</span> <span class="identifier">s</span> <span class="special">=</span> <span class="identifier">d</span> <span class="special">/</span> <span class="identifier">t</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"Speed = "</span> <span class="special"><<</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">get</span><span class="special">()</span> <span class="special"><<</span> <span class="string">" meters/sec\n"</span><span class="special">;</span>
<span class="identifier">User1</span><span class="special">::</span><span class="identifier">Acceleration</span> <span class="identifier">a</span> <span class="special">=</span> <span class="identifier">User1</span><span class="special">::</span><span class="identifier">Distance</span><span class="special">(</span> <span class="identifier">User1</span><span class="special">::</span><span class="identifier">foot</span><span class="special">(</span><span class="number">32.2</span><span class="special">)</span> <span class="special">)</span> <span class="special">/</span> <span class="identifier">User1</span><span class="special">::</span><span class="identifier">Time</span><span class="special">()</span> <span class="special">/</span> <span class="identifier">User1</span><span class="special">::</span><span class="identifier">Time</span><span class="special">();</span>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/examples/simulated_thread_interface_demonstration_program.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/examples/simulated_thread_interface_demonstration_program.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/examples/simulated_thread_interface_demonstration_program.html 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -70,7 +70,7 @@
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
<span class="keyword">struct</span> <span class="identifier">timed_mutex</span> <span class="special">{</span>
<span class="comment">// ...
-</span>
+</span>
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">></span>
<span class="keyword">bool</span> <span class="identifier">try_lock_for</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">>&</span> <span class="identifier">d</span><span class="special">)</span> <span class="special">{</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">microseconds</span> <span class="identifier">t</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration_cast</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">microseconds</span><span class="special">>(</span><span class="identifier">d</span><span class="special">);</span>
@@ -109,7 +109,7 @@
<span class="keyword">struct</span> <span class="identifier">condition_variable</span>
<span class="special">{</span>
<span class="comment">// ...
-</span>
+</span>
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">></span>
<span class="keyword">bool</span> <span class="identifier">wait_for</span><span class="special">(</span><span class="identifier">mutex</span><span class="special">&,</span> <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">>&</span> <span class="identifier">d</span><span class="special">)</span> <span class="special">{</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">microseconds</span> <span class="identifier">t</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration_cast</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">microseconds</span><span class="special">>(</span><span class="identifier">d</span><span class="special">);</span>
@@ -150,7 +150,7 @@
<span class="identifier">this_thread</span><span class="special">::</span><span class="identifier">sleep_for</span><span class="special">(</span><span class="identifier">seconds</span><span class="special">(</span><span class="number">3</span><span class="special">));</span>
<span class="identifier">this_thread</span><span class="special">::</span><span class="identifier">sleep_for</span><span class="special">(</span><span class="identifier">nanoseconds</span><span class="special">(</span><span class="number">300</span><span class="special">));</span>
-<span class="identifier">system_clock</span><span class="special">::</span><span class="identifier">time_point</span> <span class="identifier">time_limit</span> <span class="special">=</span> <span class="identifier">system_clock</span><span class="special">::</span><span class="identifier">now</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">seconds</span><span class="special">(</span><span class="number">4</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">milliseconds</span><span class="special">(</span><span class="number">500</span><span class="special">);</span>
+<span class="identifier">system_clock</span><span class="special">::</span><span class="identifier">time_point</span> <span class="identifier">time_limit</span> <span class="special">=</span> <span class="identifier">system_clock</span><span class="special">::</span><span class="identifier">now</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">seconds</span><span class="special">(</span><span class="number">4</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">milliseconds</span><span class="special">(</span><span class="number">500</span><span class="special">);</span>
<span class="identifier">this_thread</span><span class="special">::</span><span class="identifier">sleep_until</span><span class="special">(</span><span class="identifier">time_limit</span><span class="special">);</span>
<span class="identifier">mut</span><span class="special">.</span><span class="identifier">try_lock_for</span><span class="special">(</span><span class="identifier">milliseconds</span><span class="special">(</span><span class="number">30</span><span class="special">));</span>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/examples/xtime_clock.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/examples/xtime_clock.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/examples/xtime_clock.html 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -58,7 +58,7 @@
<span class="identifier">tv_sec</span> <span class="special">=</span> <span class="keyword">static_cast</span><span class="special"><</span><span class="keyword">long</span><span class="special">>(</span><span class="identifier">usec</span> <span class="special">/</span> <span class="number">1000000</span><span class="special">);</span>
<span class="identifier">fixup</span><span class="special">();</span>
<span class="special">}</span>
-
+
<span class="comment">// explicit
</span> <span class="keyword">operator</span> <span class="keyword">long</span> <span class="keyword">long</span><span class="special">()</span> <span class="keyword">const</span> <span class="special">{</span><span class="keyword">return</span> <span class="keyword">static_cast</span><span class="special"><</span><span class="keyword">long</span> <span class="keyword">long</span><span class="special">>(</span><span class="identifier">tv_sec</span><span class="special">)</span> <span class="special">*</span> <span class="number">1000000</span> <span class="special">+</span> <span class="identifier">tv_usec</span><span class="special">;}</span>
@@ -143,8 +143,8 @@
<span class="identifier">xtime</span> <span class="identifier">xt</span><span class="special">(</span> <span class="identifier">ts</span><span class="special">.</span><span class="identifier">tv_sec</span><span class="special">,</span> <span class="identifier">ts</span><span class="special">.</span><span class="identifier">tv_nsec</span><span class="special">/</span><span class="number">1000</span><span class="special">);</span>
<span class="keyword">return</span> <span class="identifier">time_point</span><span class="special">(</span><span class="identifier">duration</span><span class="special">(</span><span class="identifier">xt</span><span class="special">));</span>
-
- <span class="preprocessor">#endif</span> <span class="comment">// POSIX
+
+ <span class="preprocessor">#endif</span> <span class="comment">// POSIX
</span> <span class="special">}</span>
<span class="special">};</span>
</pre>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/overview.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/overview.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/overview.html 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -88,7 +88,7 @@
capturing system-CPU times.
</li>
<li>
-<code class="computeroutput"><span class="identifier">process_clocks</span></code>, tuple-like
+<code class="computeroutput"><span class="identifier">process_cpu_clocks</span></code>, tuple-like
class capturing at once real, user-CPU, and system-CPU times.
</li>
</ul></div>
@@ -115,21 +115,21 @@
</ul></div>
</li>
<li>
- Stopwatch reporters:
+ Stopclocks or Stopwatch reporters:
<div class="itemizedlist"><ul type="circle">
<li>
<code class="computeroutput"><span class="identifier">stopwatch_reporter</span></code>, convenient
reporting of models of Stopwatch results.
</li>
<li>
-<code class="computeroutput"><span class="identifier">process_stopwatches_reporter</span></code>,
- convenient reporting of process_stopwatches results.
- </li>
+<code class="computeroutput"><span class="identifier">stopclock</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">></span></code>
+ shortcut of <code class="computeroutput"><span class="identifier">stopwatch_reporter</span><span class="special"><</span><span class="identifier">stopwatch</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">>></span></code>
+</li>
</ul></div>
</li>
</ul></div>
<a name="boost_chrono.overview.how_to_use_this_documentation"></a><h3>
-<a name="id4765014"></a>
+<a name="id4765060"></a>
<a href="overview.html#boost_chrono.overview.how_to_use_this_documentation">How to
Use This Documentation</a>
</h3>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/overview/motivation.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/overview/motivation.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/overview/motivation.html 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -237,7 +237,7 @@
needs only 23 bits to cover that range.
</p>
<a name="boost_chrono.overview.motivation.duration.so_what_exactly_is_a__code__phrase_role__identifier__duration__phrase___code__and_how_do_i_use_one_"></a><h5>
-<a name="id4759672"></a>
+<a name="id4759450"></a>
<a href="motivation.html#boost_chrono.overview.motivation.duration.so_what_exactly_is_a__code__phrase_role__identifier__duration__phrase___code__and_how_do_i_use_one_">So
What Exactly is a <code class="computeroutput"><span class="identifier">duration</span></code>
and How Do I Use One?</a>
@@ -295,7 +295,7 @@
instead of inheritance).
</p>
<a name="boost_chrono.overview.motivation.duration.what_happens_if_i_assign__code__phrase_role__identifier__m3__phrase___phrase_role__special_____phrase___phrase_role__identifier__us3__phrase___code__to__code__phrase_role__identifier__minutes__phrase___code__instead_of__code__phrase_role__identifier__microseconds__phrase___code__"></a><h5>
-<a name="id4813151"></a>
+<a name="id4813063"></a>
<a href="motivation.html#boost_chrono.overview.motivation.duration.what_happens_if_i_assign__code__phrase_role__identifier__m3__phrase___phrase_role__special_____phrase___phrase_role__identifier__us3__phrase___code__to__code__phrase_role__identifier__minutes__phrase___code__instead_of__code__phrase_role__identifier__microseconds__phrase___code__">What
happens if I assign <code class="computeroutput"><span class="identifier">m3</span> <span class="special">+</span> <span class="identifier">us3</span></code>
to <code class="computeroutput"><span class="identifier">minutes</span></code> instead of
@@ -312,7 +312,7 @@
ignored. This is similar to the problem of assigning a double to an <code class="computeroutput"><span class="keyword">int</span></code>: the fractional part gets silently discarded.
</p>
<a name="boost_chrono.overview.motivation.duration.but_what_if_the_truncation_behavior_is_what_i_want_to_do_"></a><h5>
-<a name="id4813320"></a>
+<a name="id4813231"></a>
<a href="motivation.html#boost_chrono.overview.motivation.duration.but_what_if_the_truncation_behavior_is_what_i_want_to_do_">But
what if the truncation behavior is what I want to do?</a>
</h5>
@@ -332,7 +332,7 @@
as often as it can.
</p>
<a name="boost_chrono.overview.motivation.duration.i_m_trafficking_in_floating_point__code__phrase_role__identifier__duration__phrase___code_s__i_don_t_want_to_deal_with_writing__code__phrase_role__identifier__duration_cast__phrase___code__all_over_the_place__i_m_content_with_the_precision_of_my_floating_point_representation"></a><h5>
-<a name="id4813457"></a>
+<a name="id4813368"></a>
<a href="motivation.html#boost_chrono.overview.motivation.duration.i_m_trafficking_in_floating_point__code__phrase_role__identifier__duration__phrase___code_s__i_don_t_want_to_deal_with_writing__code__phrase_role__identifier__duration_cast__phrase___code__all_over_the_place__i_m_content_with_the_precision_of_my_floating_point_representation">I'm
trafficking in floating point <code class="computeroutput"><span class="identifier">duration</span></code>s.
I don't want to deal with writing <code class="computeroutput"><span class="identifier">duration_cast</span></code>
@@ -347,7 +347,7 @@
<span class="identifier">dminutes</span> <span class="identifier">dm4</span> <span class="special">=</span> <span class="identifier">m3</span> <span class="special">+</span> <span class="identifier">us3</span><span class="special">;</span> <span class="comment">// dm4.count() == 5.000000083333333
</span></pre>
<a name="boost_chrono.overview.motivation.duration.how_expensive_is_all_of_this_"></a><h5>
-<a name="id4813619"></a>
+<a name="id4813530"></a>
<a href="motivation.html#boost_chrono.overview.motivation.duration.how_expensive_is_all_of_this_">How
expensive is all of this?</a>
</h5>
@@ -361,7 +361,7 @@
tick counts.
</p>
<a name="boost_chrono.overview.motivation.duration.how_complicated_is_it_to_build_a_function_taking_a__code__phrase_role__identifier__duration__phrase___code__parameter_"></a><h5>
-<a name="id4813669"></a>
+<a name="id4813580"></a>
<a href="motivation.html#boost_chrono.overview.motivation.duration.how_complicated_is_it_to_build_a_function_taking_a__code__phrase_role__identifier__duration__phrase___code__parameter_">How
complicated is it to build a function taking a <code class="computeroutput"><span class="identifier">duration</span></code>
parameter?</a>
@@ -583,7 +583,7 @@
the relationship between the epochs associated with each clock is known.
</p>
<a name="boost_chrono.overview.motivation.time_point.so_what_exactly_is_a__code__phrase_role__identifier__time_point__phrase___code__and_how_do_i_use_one_"></a><h5>
-<a name="id4815475"></a>
+<a name="id4815385"></a>
<a href="motivation.html#boost_chrono.overview.motivation.time_point.so_what_exactly_is_a__code__phrase_role__identifier__time_point__phrase___code__and_how_do_i_use_one_">So
What Exactly is a <code class="computeroutput"><span class="identifier">time_point</span></code>
and How Do I Use One?</a>
@@ -689,7 +689,7 @@
<span class="identifier">std</span><span class="special">::</span><span class="identifier">sqrt</span><span class="special">(</span> <span class="number">123.456L</span> <span class="special">);</span> <span class="comment">// burn some time
</span>
<span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
-<span class="special">}</span>
+<span class="special">}</span>
<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{</span>
<span class="identifier">f1</span><span class="special">(</span><span class="number">100000</span><span class="special">);</span>
<span class="identifier">f1</span><span class="special">(</span><span class="number">200000</span><span class="special">);</span>
@@ -719,7 +719,7 @@
<span class="identifier">std</span><span class="special">::</span><span class="identifier">sqrt</span><span class="special">(</span> <span class="number">123.456L</span> <span class="special">);</span> <span class="comment">// burn some time
</span>
<span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
-<span class="special">}</span>
+<span class="special">}</span>
<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{</span>
<span class="identifier">f1</span><span class="special">(</span><span class="number">100000</span><span class="special">);</span>
<span class="identifier">f1</span><span class="special">(</span><span class="number">200000</span><span class="special">);</span>
@@ -757,17 +757,13 @@
</p>
<p>
These clocks capture the specific time unitarily. <span class="bold"><strong>Boost.Chrono</strong></span>
- provides also a pseudo-clock <code class="computeroutput"><span class="identifier">process_clocks</span></code>
- that captures the three times at once. As <code class="computeroutput"><span class="identifier">process_clocks</span></code>
- do not conform to the Stopwatch concept, As <code class="computeroutput"><span class="identifier">stopwatch</span><span class="special"><</span><span class="identifier">process_clocks</span><span class="special">></span></code> and <code class="computeroutput"><span class="identifier">stopwatch_reporter</span><span class="special"><</span><span class="identifier">stopwatch</span><span class="special"><</span><span class="identifier">process_clocks</span><span class="special">></span> <span class="special">></span></code>
- do not works, <span class="bold"><strong>Boost.Chrono</strong></span> provides the
- equivalent classes <code class="computeroutput"><span class="identifier">process_stopwatches</span></code>
- and <code class="computeroutput"><span class="identifier">process_stopwatches_reporter</span></code>
+ provides also a clock <code class="computeroutput"><span class="identifier">process_cpu_clock</span></code>
+ that captures the three times at once.
</p>
<pre class="programlisting"><span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">;</span>
<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
<span class="special">{</span>
- <span class="identifier">process_stopwatches_reporter</span> <span class="identifier">_</span><span class="special">;</span>
+ <span class="identifier">stopwatch_reporter</span><span class="special"><</span><span class="identifier">stopwatch</span><span class="special"><</span><span class="identifier">process_cpu_clock</span><span class="special">></span> <span class="special">></span> <span class="identifier">_</span><span class="special">;</span>
<span class="comment">// ...
</span><span class="special">}</span>
</pre>
@@ -776,6 +772,17 @@
</p>
<pre class="programlisting"><span class="identifier">real</span> <span class="number">0.034</span><span class="identifier">s</span><span class="special">,</span> <span class="identifier">cpu</span> <span class="number">0.031</span><span class="identifier">s</span> <span class="special">(</span><span class="number">93.0</span><span class="special">%),</span> <span class="identifier">user</span> <span class="number">0.031</span><span class="identifier">s</span><span class="special">,</span> <span class="identifier">system</span> <span class="number">0.000</span><span class="identifier">s</span>
</pre>
+<p>
+ As this is one of the expression more common the library provides a stopclock
+ shortcut so the preceding can be writen as
+ </p>
+<pre class="programlisting"><span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">;</span>
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">stopclock</span><span class="special"><></span> <span class="identifier">_</span><span class="special">;</span>
+ <span class="comment">// ...
+</span><span class="special">}</span>
+</pre>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference.html 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -53,19 +53,25 @@
<dt><span class="section"><a href="reference/stopwatch_reporters.html">Stopwatch
Reporters</a></span></dt>
<dd><dl>
+<dt><span class="section">Formatter
Requirements</span></dt>
+<dt><span class="section">Formatter
related traits</span></dt>
<dt><span class="section"><a href="reference/stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.stopwatch_reporter_hpp">
Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatch_reporter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
-<dt><span class="section"><a href="reference/stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.digital_time_hpp">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">digital_time</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
-<dt><span class="section"><a href="reference/stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.stopwatch_formatter_hpp">
+<dt><span class="section"><a href="reference/stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.stopclock_hpp">
+ Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopclock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="reference/stopwatch_formatters.html">Stopwatch
+ Formatters</a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="reference/stopwatch_formatters.html#boost_chrono.reference.stopwatch_formatters.stopwatch_formatter_hpp">
Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatch_formatter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
-<dt><span class="section"><a href="reference/stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.stopwatch_accumulator_formatter_hpp">
+<dt><span class="section"><a href="reference/stopwatch_formatters.html#boost_chrono.reference.stopwatch_formatters.stopwatch_accumulator_formatter_hpp">
Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatch_accumulator_formatter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
-<dt><span class="section"><a href="reference/stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.process_process_stopwatches_reporter_hpp">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">process_stopwatches_reporter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
-<dt><span class="section"><a href="reference/stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.time_formatter_hpp">
+<dt><span class="section"><a href="reference/stopwatch_formatters.html#boost_chrono.reference.stopwatch_formatters.time_formatter_hpp">
Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">time_formatter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
-<dt><span class="section"><a href="reference/stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.digital_time_formatter_hpp">
+<dt><span class="section"><a href="reference/stopwatch_formatters.html#boost_chrono.reference.stopwatch_formatters.digital_time_hpp">
+ Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">digital_time</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
+<dt><span class="section"><a href="reference/stopwatch_formatters.html#boost_chrono.reference.stopwatch_formatters.digital_time_formatter_hpp">
Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">digital_time_formatter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
</dl></dd>
<dt><span class="section"><a href="reference/deprecated_headers.html">Deprecated
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/cpp0x.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/cpp0x.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/cpp0x.html 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -588,7 +588,7 @@
and both of these calls happen before <code class="computeroutput"><span class="identifier">C1</span><span class="special">::</span><span class="identifier">time_point</span><span class="special">::</span><span class="identifier">max</span><span class="special">()</span></code>.
</p>
<div class="table">
-<a name="id4831330"></a><p class="title"><b>Table 1. Clock Requirements</b></p>
+<a name="id4831240"></a><p class="title"><b>Table 1. Clock Requirements</b></p>
<table class="table" summary="Clock Requirements">
<colgroup>
<col>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/deprecated_headers.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/deprecated_headers.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/deprecated_headers.html 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -7,8 +7,8 @@
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
<link rel="start" href="../../index.html" title="Boost.Chrono">
<link rel="up" href="../reference.html" title=" Reference ">
-<link rel="prev" href="stopwatch_reporters.html" title="Stopwatch
- Reporters">
+<link rel="prev" href="stopwatch_formatters.html" title="Stopwatch
+ Formatters">
<link rel="next" href="../examples.html" title="Examples">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -22,7 +22,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="stopwatch_reporters.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../examples.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="stopwatch_formatters.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../examples.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
@@ -63,7 +63,7 @@
<dt><span class="section">timer
useful typedefs</span></dt>
</dl></div>
<p>
- This header has been replaced by the header <boost/chrono/stopwatch.hpp>.
+ This header has been deprecated, use instead <boost/chrono/stopwatch.hpp>.
</p>
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">=</span><span class="identifier">high_resolution_clock</span><span class="special">></span> <span class="keyword">class</span> <span class="identifier">timer</span><span class="special">;</span>
@@ -138,9 +138,9 @@
<code class="computeroutput"><span class="identifier">run_timer</span></code></a></span></dt>
</dl></div>
<p>
- This header has been deprecated. See the <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">process_clocks</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>,
- <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">process_stopwatches</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code> and <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">process_stopwatches_reporter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
- files.
+ This header has been deprecated. Use instead <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">process_cpu_clocks</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>,
+ <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatch</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>, <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatch_reporter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
+ and <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopclock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code> files.
</p>
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
@@ -346,7 +346,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="stopwatch_reporters.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../examples.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="stopwatch_formatters.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../examples.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/process_cpu_related.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/process_cpu_related.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/process_cpu_related.html 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -214,7 +214,7 @@
<span class="identifier">process_real_cpu_clock</span><span class="special">::</span><span class="identifier">rep</span> <span class="identifier">real</span><span class="special">;</span> <span class="comment">// real (i.e wall clock) time
</span> <span class="identifier">process_user_cpu_clock</span><span class="special">::</span><span class="identifier">rep</span> <span class="identifier">user</span><span class="special">;</span> <span class="comment">// user cpu time
</span> <span class="identifier">process_system_cpu_clock</span><span class="special">::</span><span class="identifier">rep</span> <span class="identifier">system</span><span class="special">;</span> <span class="comment">// system cpu time
-</span>
+</span>
<span class="identifier">times</span><span class="special">();</span>
<span class="identifier">times</span><span class="special">(</span>
<span class="identifier">process_real_cpu_clock</span><span class="special">::</span><span class="identifier">rep</span> <span class="identifier">r</span><span class="special">,</span>
@@ -222,7 +222,7 @@
<span class="identifier">process_system_cpu_clock</span><span class="special">::</span><span class="identifier">rep</span> <span class="identifier">s</span><span class="special">);</span>
<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">==(</span><span class="identifier">times</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">rhs</span><span class="special">);</span>
-
+
<span class="identifier">times</span> <span class="keyword">operator</span><span class="special">+=(</span><span class="identifier">times</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">rhs</span><span class="special">);</span>
<span class="identifier">times</span> <span class="keyword">operator</span><span class="special">-=(</span><span class="identifier">times</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">rhs</span><span class="special">);</span>
<span class="identifier">times</span> <span class="keyword">operator</span><span class="special">*=(</span><span class="identifier">times</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">rhs</span><span class="special">);</span>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/stopwatch_reporters.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/stopwatch_reporters.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/stopwatch_reporters.html 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -8,8 +8,8 @@
<link rel="start" href="../../index.html" title="Boost.Chrono">
<link rel="up" href="../reference.html" title=" Reference ">
<link rel="prev" href="stopwatches.html" title="Stopwatches">
-<link rel="next" href="deprecated_headers.html" title="Deprecated
- Headers">
+<link rel="next" href="stopwatch_formatters.html" title="Stopwatch
+ Formatters">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -22,7 +22,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="stopwatches.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="deprecated_headers.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="stopwatches.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="stopwatch_formatters.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
@@ -31,91 +31,43 @@
Reporters</a>
</h3></div></div></div>
<div class="toc"><dl>
+<dt><span class="section">Formatter
Requirements</span></dt>
+<dt><span class="section">Formatter
related traits</span></dt>
<dt><span class="section"><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.stopwatch_reporter_hpp">
Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatch_reporter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
+<dd><dl><dt><span class="section"><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.stopwatch_reporter_hpp.template_class__stopwatch_reporter___">Template
+ Class <code class="computeroutput"><span class="identifier">stopwatch_reporter</span><span class="special"><></span></code></a></span></dt></dl></dd>
+<dt><span class="section"><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.stopclock_hpp">
+ Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopclock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
<dd><dl>
-<dt><span class="section">Formatter
Requirements</span></dt>
-<dt><span class="section">Formatter
related traits</span></dt>
-<dt><span class="section"><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.stopwatch_reporter_hpp.template_class__stopwatch_reporter___">Template
- Class <code class="computeroutput"><span class="identifier">stopwatch_reporter</span><span class="special"><></span></code></a></span></dt>
-<dt><span class="section">stopwatch_reporter
useful typedefs</span></dt>
+<dt><span class="section"><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.stopclock_hpp.template_class__stopclock___">Template
+ Class <code class="computeroutput"><span class="identifier">stopclock</span><span class="special"><></span></code></a></span></dt>
+<dt><span class="section">stopclock
useful typedefs</span></dt>
</dl></dd>
-<dt><span class="section"><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.digital_time_hpp">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">digital_time</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
-<dd><dl><dt><span class="section"><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.digital_time_hpp.class__digital_time_">Class
- <code class="computeroutput"><span class="identifier">digital_time</span></code></a></span></dt></dl></dd>
-<dt><span class="section"><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.stopwatch_formatter_hpp">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatch_formatter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
-<dd><dl><dt><span class="section"><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.stopwatch_formatter_hpp.class__stopwatch_formatter_">Class
- <code class="computeroutput"><span class="identifier">stopwatch_formatter</span></code></a></span></dt></dl></dd>
-<dt><span class="section"><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.stopwatch_accumulator_formatter_hpp">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatch_accumulator_formatter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
-<dd><dl><dt><span class="section"><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.stopwatch_accumulator_formatter_hpp.class__stopwatch_accumulator_formatter_">Class
- <code class="computeroutput"><span class="identifier">stopwatch_accumulator_formatter</span></code></a></span></dt></dl></dd>
-<dt><span class="section"><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.process_process_stopwatches_reporter_hpp">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">process_stopwatches_reporter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
-<dd><dl><dt><span class="section"><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.process_process_stopwatches_reporter_hpp.class__process_stopwatches_reporter_">Class
- <code class="computeroutput"><span class="identifier">process_stopwatches_reporter</span></code></a></span></dt></dl></dd>
-<dt><span class="section"><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.time_formatter_hpp">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">time_formatter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
-<dd><dl><dt><span class="section"><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.time_formatter_hpp.class__time_formatter_">Class
- <code class="computeroutput"><span class="identifier">time_formatter</span></code></a></span></dt></dl></dd>
-<dt><span class="section"><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.digital_time_formatter_hpp">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">digital_time_formatter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a></span></dt>
-<dd><dl><dt><span class="section"><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.digital_time_formatter_hpp.class__time_formatter_">Class
- <code class="computeroutput"><span class="identifier">time_formatter</span></code></a></span></dt></dl></dd>
</dl></div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_chrono.reference.stopwatch_reporters.stopwatch_reporter_hpp"></a><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.stopwatch_reporter_hpp" title="
- Header <boost/chrono/stopwatch_reporter.hpp>">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatch_reporter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
+<a name="boost_chrono.reference.stopwatch_reporters._formatter__requirements"></a>Formatter
Requirements
</h4></div></div></div>
-<div class="toc"><dl>
-<dt><span class="section">Formatter
Requirements</span></dt>
-<dt><span class="section">Formatter
related traits</span></dt>
-<dt><span class="section"><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.stopwatch_reporter_hpp.template_class__stopwatch_reporter___">Template
- Class <code class="computeroutput"><span class="identifier">stopwatch_reporter</span><span class="special"><></span></code></a></span></dt>
-<dt><span class="section">stopwatch_reporter
useful typedefs</span></dt>
-</dl></div>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Stopwatch</span><span class="special">></span>
- <span class="keyword">struct</span> <span class="identifier">stopwatch_reporter_default_formatter</span><span class="special">;</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Stopwatch</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Formatter</span><span class="special">=</span><span class="keyword">typename</span> <span class="identifier">stopwatch_reporter_default_formatter</span><span class="special"><</span><span class="identifier">Stopwatch</span><span class="special">>::</span><span class="identifier">type</span><span class="special">></span>
- <span class="keyword">class</span> <span class="identifier">stopwatch_reporter</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="special"><</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">></span> <span class="identifier">system_stopwatch_reporter</span><span class="special">;</span>
- <span class="preprocessor">#ifdef</span> <span class="identifier">BOOST_CHRONO_HAS_CLOCK_MONOTONIC</span>
- <span class="keyword">typedef</span> <span class="special"><</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">></span> <span class="identifier">monotonic_stopwatch_reporter</span><span class="special">;</span>
- <span class="preprocessor">#endif</span>
- <span class="keyword">typedef</span> <span class="special"><</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">></span> <span class="identifier">high_resolution_stopwatch_reporter</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="special"><</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">></span> <span class="identifier">process_real_cpu_stopwatch_reporter</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="special"><</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">></span> <span class="identifier">process_user_cpu_stopwatch_reporter</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="special"><</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">></span> <span class="identifier">process_system_cpu_stopwatch_reporter</span><span class="special">;</span>
-<span class="special">}}</span>
-</pre>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.reference.stopwatch_reporters.stopwatch_reporter_hpp._formatter__requirements"></a>Formatter
Requirements
-</h5></div></div></div>
-<p>
- A Formatter outputs on a given ostream a formatted string combining informations
- from a Stopwatch and the format and the double precission.
- </p>
<p>
- A Stopwatch must meet the requirements in the following Table.
- </p>
-<p>
- In this table <code class="computeroutput"><span class="identifier">F</span></code> denote
- Fromaters types, <code class="computeroutput"><span class="identifier">S</span></code> is
- a Stopwatch and <code class="computeroutput"><span class="identifier">s</span></code> is
- an instance of <code class="computeroutput"><span class="identifier">S</span></code>, <code class="computeroutput"><span class="identifier">f</span></code> is <code class="computeroutput"><span class="keyword">const</span>
- <span class="keyword">char</span> <span class="special">*</span></code>
- , <code class="computeroutput"><span class="identifier">p</span></code> is and int, and
- <code class="computeroutput"><span class="identifier">os</span></code> is a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span></code>, ec is a system::error_code
- </p>
+ A Formatter outputs on a given ostream a formatted string combining informations
+ from a Stopwatch and the format and the double precission.
+ </p>
+<p>
+ A Stopwatch must meet the requirements in the following Table.
+ </p>
+<p>
+ In this table <code class="computeroutput"><span class="identifier">F</span></code> denote
+ Fromaters types, <code class="computeroutput"><span class="identifier">S</span></code> is a
+ Stopwatch and <code class="computeroutput"><span class="identifier">s</span></code> is an instance
+ of <code class="computeroutput"><span class="identifier">S</span></code>, <code class="computeroutput"><span class="identifier">f</span></code>
+ is <code class="computeroutput"><span class="keyword">const</span> <span class="keyword">char</span>
+ <span class="special">*</span></code> , <code class="computeroutput"><span class="identifier">p</span></code>
+ is and int, and <code class="computeroutput"><span class="identifier">os</span></code> is a
+ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span></code>, ec is a system::error_code
+ </p>
<div class="table">
-<a name="id4862296"></a><p class="title"><b>Table 3. Stopwatch Requirements</b></p>
+<a name="id4861716"></a><p class="title"><b>Table 3. Stopwatch Requirements</b></p>
<table class="table" summary="Stopwatch Requirements">
<colgroup>
<col>
@@ -124,113 +76,130 @@
</colgroup>
<thead><tr>
<th>
- <p>
- expression
- </p>
- </th>
+ <p>
+ expression
+ </p>
+ </th>
<th>
- <p>
- return type
- </p>
- </th>
+ <p>
+ return type
+ </p>
+ </th>
<th>
- <p>
- operational semantics
- </p>
- </th>
+ <p>
+ operational semantics
+ </p>
+ </th>
</tr></thead>
<tbody>
<tr>
<td>
- <p>
- <code class="computeroutput"><span class="identifier">F</span><span class="special">::</span><span class="identifier">output</span><span class="special">()</span></code>
- </p>
- </td>
-<td>
- <p>
- std::otream&
- </p>
- </td>
-<td>
- <p>
- The output stream.
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">F</span><span class="special">::</span><span class="identifier">output</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ std::otream&
+ </p>
+ </td>
+<td>
+ <p>
+ The output stream.
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <code class="computeroutput"><span class="identifier">F</span><span class="special">::</span><span class="identifier">default_places</span><span class="special">()</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span></code>
- </p>
- </td>
-<td>
- <p>
- The precission when displaying a double.
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">F</span><span class="special">::</span><span class="identifier">default_places</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The precission when displaying a double.
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <code class="computeroutput"><span class="identifier">F</span><span class="special">::</span><span class="identifier">default_format</span><span class="special">()</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span></code>
- </p>
- </td>
-<td>
- <p>
- The default format.
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">F</span><span class="special">::</span><span class="identifier">default_format</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The default format.
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <code class="computeroutput"><span class="identifier">F</span><span class="special">::</span><span class="identifier">show_time</span><span class="special">(</span><span class="identifier">s</span><span class="special">,</span><span class="identifier">f</span><span class="special">,</span><span class="identifier">p</span><span class="special">,</span><span class="identifier">os</span><span class="special">,</span><span class="identifier">ec</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">S</span><span class="special">::</span><span class="identifier">time_point</span></code>
- </p>
- </td>
-<td>
- <p>
- outputs on <code class="computeroutput"><span class="identifier">os</span></code> a
- formatted string combining informations from the Stopwatch <code class="computeroutput"><span class="identifier">s</span></code>, the format <code class="computeroutput"><span class="identifier">f</span></code>
- and the double precission <code class="computeroutput"><span class="identifier">p</span></code>.
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">F</span><span class="special">::</span><span class="identifier">show_time</span><span class="special">(</span><span class="identifier">s</span><span class="special">,</span><span class="identifier">f</span><span class="special">,</span><span class="identifier">p</span><span class="special">,</span><span class="identifier">os</span><span class="special">,</span><span class="identifier">ec</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">S</span><span class="special">::</span><span class="identifier">time_point</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ outputs on <code class="computeroutput"><span class="identifier">os</span></code> a formatted
+ string combining informations from the Stopwatch <code class="computeroutput"><span class="identifier">s</span></code>,
+ the format <code class="computeroutput"><span class="identifier">f</span></code> and
+ the double precission <code class="computeroutput"><span class="identifier">p</span></code>.
+ </p>
+ </td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" lang="en">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.reference.stopwatch_reporters.stopwatch_reporter_hpp._formatter__related_traits"></a>Formatter
related traits
-</h5></div></div></div>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Stopwatch</span><span class="special">></span>
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono.reference.stopwatch_reporters._formatter__related_traits"></a>Formatter
related traits
+</h4></div></div></div>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Stopwatch</span><span class="special">></span>
<span class="keyword">struct</span> <span class="identifier">stopwatch_reporter_default_formatter</span> <span class="special">{</span>
<span class="keyword">typedef</span> <span class="special"><</span><span class="identifier">see</span> <span class="identifier">below</span><span class="special">></span> <span class="identifier">type</span><span class="special">;</span>
<span class="special">};</span>
</pre>
<p>
- The nested typedef <code class="computeroutput"><span class="identifier">type</span></code>
- defines the default formatter used by the <code class="computeroutput"><span class="identifier">stopwatch_reporter</span></code>
- class when the <code class="computeroutput"><span class="identifier">Formatter</span></code>
- parameter is not explicit.
- </p>
+ The nested typedef <code class="computeroutput"><span class="identifier">type</span></code>
+ defines the default formatter used by the <code class="computeroutput"><span class="identifier">stopwatch_reporter</span></code>
+ class when the <code class="computeroutput"><span class="identifier">Formatter</span></code>
+ parameter is not explicit.
+ </p>
</div>
<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_chrono.reference.stopwatch_reporters.stopwatch_reporter_hpp"></a><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.stopwatch_reporter_hpp" title="
+ Header <boost/chrono/stopwatch_reporter.hpp>">
+ Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatch_reporter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
+</h4></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.stopwatch_reporter_hpp.template_class__stopwatch_reporter___">Template
+ Class <code class="computeroutput"><span class="identifier">stopwatch_reporter</span><span class="special"><></span></code></a></span></dt></dl></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Stopwatch</span><span class="special">></span>
+ <span class="keyword">struct</span> <span class="identifier">stopwatch_reporter_default_formatter</span><span class="special">;</span>
+
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Stopwatch</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Formatter</span><span class="special">=</span><span class="keyword">typename</span> <span class="identifier">stopwatch_reporter_default_formatter</span><span class="special"><</span><span class="identifier">Stopwatch</span><span class="special">>::</span><span class="identifier">type</span><span class="special">></span>
+ <span class="keyword">class</span> <span class="identifier">stopwatch_reporter</span><span class="special">;</span>
+<span class="special">}}</span>
+</pre>
+<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
<a name="boost_chrono.reference.stopwatch_reporters.stopwatch_reporter_hpp.template_class__stopwatch_reporter___"></a><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.stopwatch_reporter_hpp.template_class__stopwatch_reporter___" title="Template
Class stopwatch_reporter<>">Template
@@ -254,7 +223,7 @@
The default places is given by Formatter::default_places. The default
format is given by Formatter::default_format.
</p>
-<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Stopwatch</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Formatter</span><span class="special">></span>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Stopwatch</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Formatter</span><span class="special">></span>
<span class="keyword">class</span> <span class="identifier">stopwatch_reporter</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">Stopwatch</span> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
<span class="keyword">explicit</span> <span class="identifier">stopwatch_reporter</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">throws</span> <span class="special">);</span>
@@ -285,11 +254,11 @@
<span class="keyword">void</span> <span class="identifier">report</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">throws</span> <span class="special">);</span>
<span class="keyword">bool</span> <span class="identifier">reported</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
-
-
+
+
<span class="keyword">typedef</span> <span class="identifier">stopwatch_runner</span><span class="special"><</span><span class="identifier">stopwatch_reporter</span><span class="special"><</span><span class="identifier">Stopwatch</span><span class="special">></span> <span class="special">></span> <span class="identifier">scoped_run</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">stopwatch_suspender</span><span class="special"><</span><span class="identifier">stopwatch_reporter</span><span class="special"><</span><span class="identifier">Stopwatch</span><span class="special">></span> <span class="special">></span> <span class="identifier">scoped_suspend</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">stopwatch_resumer</span><span class="special"><</span><span class="identifier">stopwatch_reporter</span><span class="special"><</span><span class="identifier">Stopwatch</span><span class="special">></span> <span class="special">></span> <span class="identifier">scoped_resume</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">stopwatch_resumer</span><span class="special"><</span><span class="identifier">stopwatch_reporter</span><span class="special"><</span><span class="identifier">Stopwatch</span><span class="special">></span> <span class="special">></span> <span class="identifier">scoped_resume</span><span class="special">;</span>
<span class="special">};</span>
</pre>
<p>
@@ -301,433 +270,101 @@
<span class="keyword">static</span> <span class="identifier">accumulator</span> <span class="identifier">t</span><span class="special">;</span>
<span class="identifier">accumulator</span><span class="special">::</span><span class="identifier">scoped_run</span> <span class="identifier">_</span><span class="special">(</span><span class="identifier">t</span><span class="special">);</span>
<span class="comment">// ...
-</span>
+</span>
<span class="comment">// call to some function we don't want to measure
-</span> <span class="special">{</span>
+</span> <span class="special">{</span>
<span class="identifier">accumulator</span><span class="special">::</span><span class="identifier">scoped_suspend</span> <span class="identifier">_</span><span class="special">(</span><span class="identifier">t</span><span class="special">);</span>
<span class="identifier">external_function</span><span class="special">();</span>
<span class="special">}</span>
<span class="special">}</span>
</pre>
</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.reference.stopwatch_reporters.stopwatch_reporter_hpp._stopwatch_reporter__useful_typedefs"></a>stopwatch_reporter
useful typedefs
-</h5></div></div></div>
-<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopwatch_reporter</span><span class="special"><</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">system_clock</span> <span class="special">></span> <span class="identifier">system_stopwatch_reporter</span><span class="special">;</span>
-<span class="preprocessor">#ifdef</span> <span class="identifier">BOOST_CHRONO_HAS_CLOCK_MONOTONIC</span>
-<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopwatch_reporter</span><span class="special"><</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">monotonic_clock</span> <span class="special">></span> <span class="identifier">monotonic_stopwatch_reporter</span><span class="special">;</span>
-<span class="preprocessor">#endif</span>
-<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopwatch_reporter</span><span class="special"><</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">high_resolution_clock</span> <span class="special">></span> <span class="identifier">high_resolution_stopwatch_reporter</span><span class="special">;</span>
-<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopwatch_reporter</span><span class="special"><</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">process_real_cpu_clock</span> <span class="special">></span> <span class="identifier">process_real_cpu_stopwatch_reporter</span><span class="special">;</span>
-<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopwatch_reporter</span><span class="special"><</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">process_user_cpu_clock</span> <span class="special">></span> <span class="identifier">process_user_cpu_stopwatch_reporter</span><span class="special">;</span>
-<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopwatch_reporter</span><span class="special"><</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">process_system_cpu_clock</span> <span class="special">></span> <span class="identifier">process_system_cpu_stopwatch_reporter</span><span class="special">;</span>
-</pre>
-</div>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_chrono.reference.stopwatch_reporters.digital_time_hpp"></a><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.digital_time_hpp" title="
- Header <boost/chrono/digital_time.hpp>">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">digital_time</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
+<a name="boost_chrono.reference.stopwatch_reporters.stopclock_hpp"></a><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.stopclock_hpp" title="
+ Header <boost/chrono/stopclock.hpp>">
+ Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopclock</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
</h4></div></div></div>
-<div class="toc"><dl><dt><span class="section"><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.digital_time_hpp.class__digital_time_">Class
- <code class="computeroutput"><span class="identifier">digital_time</span></code></a></span></dt></dl></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.stopclock_hpp.template_class__stopclock___">Template
+ Class <code class="computeroutput"><span class="identifier">stopclock</span><span class="special"><></span></code></a></span></dt>
+<dt><span class="section">stopclock
useful typedefs</span></dt>
+</dl></div>
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
- <span class="keyword">class</span> <span class="identifier">digital_time</span><span class="special">;</span>
-<span class="special">}}</span>
-</pre>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.reference.stopwatch_reporters.digital_time_hpp.class__digital_time_"></a><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.digital_time_hpp.class__digital_time_" title="Class
- digital_time">Class
- <code class="computeroutput"><span class="identifier">digital_time</span></code></a>
-</h5></div></div></div>
-<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">digital_time</span> <span class="special">{</span>
-<span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special"><</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">int_least32_t</span><span class="special">,</span> <span class="identifier">ratio</span><span class="special"><</span><span class="number">24</span><span class="special">*</span><span class="number">3600</span><span class="special">></span> <span class="special">></span> <span class="identifier">days</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">hours</span> <span class="identifier">hours</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">minutes</span> <span class="identifier">minutes</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">seconds</span> <span class="identifier">seconds</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">nanoseconds</span> <span class="identifier">nanoseconds</span><span class="special">;</span>
-
- <span class="identifier">days</span> <span class="identifier">days_</span><span class="special">;</span>
- <span class="identifier">hours</span> <span class="identifier">hours_</span><span class="special">;</span>
- <span class="identifier">minutes</span> <span class="identifier">minutes_</span><span class="special">;</span>
- <span class="identifier">seconds</span> <span class="identifier">seconds_</span><span class="special">;</span>
- <span class="identifier">nanoseconds</span> <span class="identifier">nanoseconds_</span><span class="special">;</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">></span>
- <span class="keyword">static</span> <span class="identifier">days</span> <span class="identifier">get_days</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">>&</span> <span class="identifier">d</span><span class="special">);</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">></span>
- <span class="keyword">static</span> <span class="identifier">hours</span> <span class="identifier">get_hours</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">>&</span> <span class="identifier">d</span><span class="special">);</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">></span>
- <span class="keyword">static</span> <span class="identifier">minutes</span> <span class="identifier">get_minutes</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">>&</span> <span class="identifier">d</span><span class="special">);</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">></span>
- <span class="keyword">static</span> <span class="identifier">seconds</span> <span class="identifier">get_seconds</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">>&</span> <span class="identifier">d</span><span class="special">);</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">></span>
- <span class="keyword">static</span> <span class="identifier">nanoseconds</span> <span class="identifier">get_nanoseconds</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">>&</span> <span class="identifier">d</span><span class="special">);</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Rep</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Period</span><span class="special">></span>
- <span class="keyword">explicit</span> <span class="identifier">digital_time</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">duration</span><span class="special"><</span><span class="identifier">Rep</span><span class="special">,</span> <span class="identifier">Period</span><span class="special">>&</span> <span class="identifier">d</span><span class="special">);</span>
-<span class="special">};</span>
-</pre>
-</div>
-</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_chrono.reference.stopwatch_reporters.stopwatch_formatter_hpp"></a><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.stopwatch_formatter_hpp" title="
- Header <boost/chrono/stopwatch_formatter.hpp>">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatch_formatter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
-</h4></div></div></div>
-<div class="toc"><dl><dt><span class="section"><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.stopwatch_formatter_hpp.class__stopwatch_formatter_">Class
- <code class="computeroutput"><span class="identifier">stopwatch_formatter</span></code></a></span></dt></dl></div>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
- <span class="keyword">class</span> <span class="identifier">stopwatch_formatter</span><span class="special">;</span>
-<span class="special">}}</span>
-</pre>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.reference.stopwatch_reporters.stopwatch_formatter_hpp.class__stopwatch_formatter_"></a><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.stopwatch_formatter_hpp.class__stopwatch_formatter_" title="Class
- stopwatch_formatter">Class
- <code class="computeroutput"><span class="identifier">stopwatch_formatter</span></code></a>
-</h5></div></div></div>
-<p>
- <code class="computeroutput"><span class="identifier">stopwatch_formatter</span></code> is
- a model of <code class="computeroutput"><span class="identifier">Formatter</span></code>.
- </p>
-<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">stopwatch_formatter</span> <span class="special">{</span>
-<span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">static</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&</span> <span class="identifier">m_cout</span><span class="special">();</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">int</span> <span class="identifier">m_default_places</span> <span class="special">=</span> <span class="number">3</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">default_format</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">int</span> <span class="identifier">default_places</span><span class="special">()</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">m_default_places</span><span class="special">;</span> <span class="special">}</span>
-
- <span class="keyword">template</span> <span class="special"><</span> <span class="keyword">class</span> <span class="identifier">Stopwatch</span> <span class="special">></span>
- <span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">show_time</span><span class="special">(</span> <span class="identifier">Stopwatch</span> <span class="special">&</span> <span class="identifier">stopwatch_</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">format</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&</span> <span class="identifier">os</span><span class="special">,</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&</span> <span class="identifier">ec</span><span class="special">);</span>
-<span class="special">};</span>
-</pre>
-<p>
- The default places is given by default_places and is 3. The default format
- is "\n%ts\n", where
- </p>
-<div class="itemizedlist"><ul type="disc"><li>
-<code class="computeroutput"><span class="special">%</span><span class="identifier">d</span></code>
- : the result of elapsed() when the reporting is done.
- </li></ul></div>
-<p>
- The time is given using the suffix "s" following the System
- International d'Unites Std.
- </p>
-</div>
-</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_chrono.reference.stopwatch_reporters.stopwatch_accumulator_formatter_hpp"></a><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.stopwatch_accumulator_formatter_hpp" title="
- Header <boost/chrono/stopwatch_accumulator_formatter.hpp>">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">stopwatch_accumulator_formatter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
-</h4></div></div></div>
-<div class="toc"><dl><dt><span class="section"><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.stopwatch_accumulator_formatter_hpp.class__stopwatch_accumulator_formatter_">Class
- <code class="computeroutput"><span class="identifier">stopwatch_accumulator_formatter</span></code></a></span></dt></dl></div>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
- <span class="keyword">class</span> <span class="identifier">stopwatch_accumulator_formatter</span><span class="special">;</span>
+ <span class="keyword">template</span>
+ <span class="special"><</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">=</span><span class="identifier">process_cpu_clock</span>
+ <span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Stopwatch</span><span class="special">=</span><span class="identifier">stopwatch</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">></span>
+ <span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Formatter</span><span class="special">=</span><span class="keyword">typename</span> <span class="identifier">stopwatch_reporter_default_formatter</span><span class="special"><</span><span class="identifier">Stopwatch</span><span class="special">>::</span><span class="identifier">type</span>
+ <span class="special">></span> <span class="keyword">class</span> <span class="identifier">stopclock</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="special"><</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">></span> <span class="identifier">system_stopclock</span><span class="special">;</span>
+ <span class="preprocessor">#ifdef</span> <span class="identifier">BOOST_CHRONO_HAS_CLOCK_MONOTONIC</span>
+ <span class="keyword">typedef</span> <span class="special"><</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">></span> <span class="identifier">monotonic_stopclock</span><span class="special">;</span>
+ <span class="preprocessor">#endif</span>
+ <span class="keyword">typedef</span> <span class="special"><</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">></span> <span class="identifier">high_resolution_stopclock</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="special"><</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">></span> <span class="identifier">process_real_cpu_stopclock</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="special"><</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">></span> <span class="identifier">process_user_cpu_stopclock</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="special"><</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">></span> <span class="identifier">process_system_cpu_stopclock</span><span class="special">;</span>
<span class="special">}}</span>
</pre>
<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.reference.stopwatch_reporters.stopwatch_accumulator_formatter_hpp.class__stopwatch_accumulator_formatter_"></a><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.stopwatch_accumulator_formatter_hpp.class__stopwatch_accumulator_formatter_" title="Class
- stopwatch_accumulator_formatter">Class
- <code class="computeroutput"><span class="identifier">stopwatch_accumulator_formatter</span></code></a>
+<a name="boost_chrono.reference.stopwatch_reporters.stopclock_hpp.template_class__stopclock___"></a><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.stopclock_hpp.template_class__stopclock___" title="Template
+ Class stopclock<>">Template
+ Class <code class="computeroutput"><span class="identifier">stopclock</span><span class="special"><></span></code></a>
</h5></div></div></div>
<p>
- <code class="computeroutput"><span class="identifier">stopwatch_accumulator_formatter</span></code>
- is a model of <code class="computeroutput"><span class="identifier">Formatter</span></code>
+ <code class="computeroutput"><span class="identifier">stopclock</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">></span></code>
+ template class is a shortcut of <code class="computeroutput"><span class="identifier">stopwatch_reporter</span><span class="special"><</span><span class="identifier">stopwatch</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">>></span></code>
</p>
-<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">stopwatch_accumulator_formatter</span> <span class="special">{</span>
+<pre class="programlisting"><span class="keyword">template</span>
+ <span class="special"><</span> <span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">=</span><span class="identifier">process_cpu_clock</span>
+ <span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Stopwatch</span><span class="special">=</span><span class="identifier">stopwatch</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">></span>
+ <span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Formatter</span><span class="special">=</span><span class="keyword">typename</span> <span class="identifier">stopwatch_reporter_default_formatter</span><span class="special"><</span><span class="identifier">Stopwatch</span><span class="special">>::</span><span class="identifier">type</span>
+<span class="special">></span> <span class="keyword">class</span> <span class="identifier">stopclock</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">stopwatch_reporter</span><span class="special"><</span><span class="identifier">Stopwatch</span><span class="special">,</span> <span class="identifier">Formatter</span><span class="special">></span> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">static</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&</span> <span class="identifier">m_cout</span><span class="special">();</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">int</span> <span class="identifier">m_default_places</span> <span class="special">=</span> <span class="number">3</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">default_format</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">int</span> <span class="identifier">default_places</span><span class="special">()</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">m_default_places</span><span class="special">;</span> <span class="special">}</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Stopwatch</span> <span class="special">></span>
- <span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">show_time</span><span class="special">(</span> <span class="identifier">Stopwatch</span> <span class="special">&</span> <span class="identifier">stopwatch_</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">format</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&</span> <span class="identifier">os</span><span class="special">,</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&</span> <span class="identifier">ec</span><span class="special">);</span>
-<span class="special">};</span>
-</pre>
-<p>
- The default places is given by default_places and is 3. The default format
- is "\n"Count<code class="literal">%c times Sum</code>%ss Min<code class="literal">%ms
- Max</code>%Ms Mean=%as\n", where
- </p>
-<div class="itemizedlist"><ul type="disc">
-<li>
-<code class="computeroutput"><span class="special">%</span><span class="identifier">c</span></code>
- : the counter of the number of times the pair srat/stop has been called.
- </li>
-<li>
-<code class="computeroutput"><span class="special">%</span><span class="identifier">s</span></code>
- : the sum of the samples of elapsed time between the call to start/stop.
- </li>
-<li>
-<code class="computeroutput"><span class="special">%</span><span class="identifier">m</span></code>
- : the min of the samples of elapsed time between the call to start/stop.
- </li>
-<li>
-<code class="computeroutput"><span class="special">%</span><span class="identifier">M</span></code>
- : the max of the samples of elapsed time between the call to start/stop.
- </li>
-<li>
-<code class="computeroutput"><span class="special">%</span><span class="identifier">a</span></code>
- : the mean of the samples of elapsed time between the call to start/stop.
- </li>
-</ul></div>
-<p>
- The time is given using the suffix "s" following the System
- International d'Unites Std.
- </p>
-</div>
-</div>
-<p>
- [
- </p>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_chrono.reference.stopwatch_reporters.process_process_stopwatches_reporter_hpp"></a><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.process_process_stopwatches_reporter_hpp" title="
- Header <boost/chrono/process_stopwatches_reporter.hpp>">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">process_stopwatches_reporter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
-</h4></div></div></div>
-<div class="toc"><dl><dt><span class="section"><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.process_process_stopwatches_reporter_hpp.class__process_stopwatches_reporter_">Class
- <code class="computeroutput"><span class="identifier">process_stopwatches_reporter</span></code></a></span></dt></dl></div>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
-
- <span class="keyword">class</span> <span class="identifier">process_stopwatches_reporter</span><span class="special">;</span>
-
-<span class="special">}</span> <span class="special">}</span>
-</pre>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.reference.stopwatch_reporters.process_process_stopwatches_reporter_hpp.class__process_stopwatches_reporter_"></a><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.process_process_stopwatches_reporter_hpp.class__process_stopwatches_reporter_" title="Class
- process_stopwatches_reporter">Class
- <code class="computeroutput"><span class="identifier">process_stopwatches_reporter</span></code></a>
-</h5></div></div></div>
-<p>
- <code class="computeroutput"><span class="identifier">process_stopwatches_reporter</span></code>
- is the <code class="computeroutput"><span class="identifier">stopwatches_reporter</span><span class="special"><></span></code> associated to the clock tuple
- <code class="computeroutput"><span class="identifier">process_clocks</span></code>.
- </p>
-<p>
- class <code class="computeroutput"><span class="identifier">process_stopwatches_reporter</span></code>
- provides a complete run time reporting package that can be invoked in
- a single line of code. The reporting is controled by two parameters:
- </p>
-<div class="itemizedlist"><ul type="disc">
-<li>
- format : The output format
- </li>
-<li>
- places(precission): the number of decimal placess used.
- </li>
-</ul></div>
-<p>
- The default places is given by default_places and is 3. The default format
- is "\nreal %rs, cpu %cs (%p%), user %us, system %ss\n", where
- </p>
-<div class="itemizedlist"><ul type="disc">
-<li>
-<code class="computeroutput"><span class="special">%</span><span class="identifier">r</span></code>
- : real process clock
- </li>
-<li>
-<code class="computeroutput"><span class="special">%</span><span class="identifier">u</span></code>
- : user process clock
- </li>
-<li>
-<code class="computeroutput"><span class="special">%</span><span class="identifier">s</span></code>
- : system process clock
- </li>
-<li>
-<code class="computeroutput"><span class="special">%</span><span class="identifier">c</span></code>
- : user+system process clock
- </li>
-<li>
-<code class="computeroutput"><span class="special">%</span><span class="identifier">p</span></code>
- : percentage (user+system)/real process clock
- </li>
-</ul></div>
-<p>
- All the units are given using the suffix "s" following the
- System International d'Unites Std.
- </p>
-<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">process_stopwatches_reporter</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">process_timer</span> <span class="special">{</span>
-<span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">explicit</span> <span class="identifier">process_stopwatches_reporter</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">throws</span> <span class="special">);</span>
- <span class="keyword">explicit</span> <span class="identifier">process_stopwatches_reporter</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&</span> <span class="identifier">os</span><span class="special">,</span>
+ <span class="keyword">explicit</span> <span class="identifier">stopclock</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">throws</span> <span class="special">);</span>
+ <span class="keyword">explicit</span> <span class="identifier">stopclock</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&</span> <span class="identifier">os</span><span class="special">,</span>
<span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">throws</span> <span class="special">);</span>
-
- <span class="keyword">explicit</span> <span class="identifier">process_stopwatches_reporter</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="keyword">explicit</span> <span class="identifier">stopclock</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&</span> <span class="identifier">format</span><span class="special">,</span>
<span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">throws</span> <span class="special">);</span>
- <span class="identifier">process_stopwatches_reporter</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="keyword">explicit</span> <span class="identifier">stopclock</span><span class="special">(</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
<span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">throws</span> <span class="special">);</span>
- <span class="identifier">process_stopwatches_reporter</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&</span> <span class="identifier">format</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">stopclock</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&</span> <span class="identifier">format</span><span class="special">,</span>
<span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">throws</span> <span class="special">);</span>
- <span class="identifier">process_stopwatches_reporter</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&</span> <span class="identifier">format</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">stopclock</span><span class="special">(</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&</span> <span class="identifier">format</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
<span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">throws</span> <span class="special">);</span>
-
- <span class="keyword">explicit</span> <span class="identifier">process_stopwatches_reporter</span><span class="special">(</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">stopclock</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
<span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">throws</span> <span class="special">);</span>
- <span class="identifier">process_stopwatches_reporter</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
+ <span class="identifier">stopclock</span><span class="special">(</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&</span> <span class="identifier">format</span><span class="special">,</span>
<span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">throws</span> <span class="special">);</span>
- <span class="identifier">process_stopwatches_reporter</span><span class="special">(</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">stopclock</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&</span> <span class="identifier">format</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span>
<span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">throws</span> <span class="special">);</span>
- <span class="identifier">process_stopwatches_reporter</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&</span> <span class="identifier">format</span><span class="special">,</span>
+ <span class="identifier">stopclock</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&</span> <span class="identifier">os</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&</span> <span class="identifier">format</span><span class="special">,</span>
<span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">throws</span> <span class="special">);</span>
- <span class="special">~</span><span class="identifier">process_stopwatches_reporter</span><span class="special">();</span>
-
- <span class="keyword">void</span> <span class="identifier">start</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">throws</span> <span class="special">);</span>
-
- <span class="keyword">void</span> <span class="identifier">report</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">throws</span> <span class="special">);</span>
- <span class="keyword">void</span> <span class="identifier">test_report</span><span class="special">(</span> <span class="identifier">duration</span> <span class="identifier">real_</span><span class="special">,</span> <span class="identifier">duration</span> <span class="identifier">user_</span><span class="special">,</span> <span class="identifier">duration</span> <span class="identifier">system_</span> <span class="special">);</span>
- <span class="keyword">bool</span> <span class="identifier">reported</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">int</span> <span class="identifier">default_places</span><span class="special">();</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">base_type</span><span class="special">::</span><span class="identifier">scoped_run</span> <span class="identifier">scoped_run</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">base_type</span><span class="special">::</span><span class="identifier">scoped_suspend</span> <span class="identifier">scoped_suspend</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">base_type</span><span class="special">::</span><span class="identifier">scoped_resume</span> <span class="identifier">scoped_resume</span><span class="special">;</span>
<span class="special">};</span>
</pre>
</div>
-</div>
-<p>
- ]
- </p>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_chrono.reference.stopwatch_reporters.time_formatter_hpp"></a><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.time_formatter_hpp" title="
- Header <boost/chrono/time_formatter.hpp>">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">time_formatter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
-</h4></div></div></div>
-<div class="toc"><dl><dt><span class="section"><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.time_formatter_hpp.class__time_formatter_">Class
- <code class="computeroutput"><span class="identifier">time_formatter</span></code></a></span></dt></dl></div>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
-
- <span class="keyword">class</span> <span class="identifier">time_formatter</span><span class="special">;</span>
-
-<span class="special">}</span> <span class="special">}</span>
-</pre>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.reference.stopwatch_reporters.time_formatter_hpp.class__time_formatter_"></a><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.time_formatter_hpp.class__time_formatter_" title="Class
- time_formatter">Class
- <code class="computeroutput"><span class="identifier">time_formatter</span></code></a>
-</h5></div></div></div>
-<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">time_formatter</span> <span class="special">{</span>
-<span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">static</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&</span> <span class="identifier">m_cout</span><span class="special">();</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">int</span> <span class="identifier">m_default_places</span> <span class="special">=</span> <span class="number">3</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">default_format</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">int</span> <span class="identifier">default_places</span><span class="special">()</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">m_default_places</span><span class="special">;</span> <span class="special">}</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Stopwatch</span> <span class="special">></span>
- <span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">show_time</span><span class="special">(</span> <span class="identifier">Stopwatch</span> <span class="special">&</span> <span class="identifier">stopwatch_</span>
- <span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">format</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&</span> <span class="identifier">os</span>
- <span class="special">,</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&</span> <span class="identifier">ec</span><span class="special">);</span>
-<span class="special">};</span>
-</pre>
-<p>
- The default places is given by default_places and is 3. The default format
- is "\nreal %rs, cpu %cs (%p%), user %us, system %ss\n", where
- </p>
-<div class="itemizedlist"><ul type="disc">
-<li>
-<code class="computeroutput"><span class="special">%</span><span class="identifier">r</span></code>
- : real process clock
- </li>
-<li>
-<code class="computeroutput"><span class="special">%</span><span class="identifier">u</span></code>
- : user process clock
- </li>
-<li>
-<code class="computeroutput"><span class="special">%</span><span class="identifier">s</span></code>
- : system process clock
- </li>
-<li>
-<code class="computeroutput"><span class="special">%</span><span class="identifier">c</span></code>
- : user+system process clock
- </li>
-<li>
-<code class="computeroutput"><span class="special">%</span><span class="identifier">p</span></code>
- : percentage (user+system)/real process clock
- </li>
-</ul></div>
-<p>
- All the units are given using the suffix "s" following the
- System International d'Unites Std.
- </p>
-</div>
-</div>
-<div class="section" lang="en">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="boost_chrono.reference.stopwatch_reporters.digital_time_formatter_hpp"></a><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.digital_time_formatter_hpp" title="
- Header <boost/chrono/digital_time_formatter.hpp>">
- Header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">digital_time_formatter</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
-</h4></div></div></div>
-<div class="toc"><dl><dt><span class="section"><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.digital_time_formatter_hpp.class__time_formatter_">Class
- <code class="computeroutput"><span class="identifier">time_formatter</span></code></a></span></dt></dl></div>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
-
- <span class="keyword">class</span> <span class="identifier">digital_time_formatter</span><span class="special">;</span>
-
-<span class="special">}</span> <span class="special">}</span>
-</pre>
<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
-<a name="boost_chrono.reference.stopwatch_reporters.digital_time_formatter_hpp.class__time_formatter_"></a><a href="stopwatch_reporters.html#boost_chrono.reference.stopwatch_reporters.digital_time_formatter_hpp.class__time_formatter_" title="Class
- time_formatter">Class
- <code class="computeroutput"><span class="identifier">time_formatter</span></code></a>
+<a name="boost_chrono.reference.stopwatch_reporters.stopclock_hpp._stopclock__useful_typedefs"></a>stopclock
useful typedefs
</h5></div></div></div>
-<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">time_formatter</span> <span class="special">{</span>
-<span class="keyword">public</span><span class="special">:</span>
- <span class="keyword">static</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&</span> <span class="identifier">m_cout</span><span class="special">();</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">int</span> <span class="identifier">m_default_places</span> <span class="special">=</span> <span class="number">3</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">default_format</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">int</span> <span class="identifier">default_places</span><span class="special">()</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">m_default_places</span><span class="special">;</span> <span class="special">}</span>
-
- <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Stopwatch</span> <span class="special">></span>
- <span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">show_time</span><span class="special">(</span> <span class="identifier">Stopwatch</span> <span class="special">&</span> <span class="identifier">stopwatch_</span>
- <span class="special">,</span> <span class="keyword">const</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">format</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">places</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostream</span> <span class="special">&</span> <span class="identifier">os</span>
- <span class="special">,</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&</span> <span class="identifier">ec</span><span class="special">);</span>
-<span class="special">};</span>
+<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopclock</span><span class="special"><</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">system_clock</span> <span class="special">></span> <span class="identifier">system_stopwatch_reporter</span><span class="special">;</span>
+<span class="preprocessor">#ifdef</span> <span class="identifier">BOOST_CHRONO_HAS_CLOCK_MONOTONIC</span>
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopclock</span><span class="special"><</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">monotonic_clock</span> <span class="special">></span> <span class="identifier">monotonic_stopwatch_reporter</span><span class="special">;</span>
+<span class="preprocessor">#endif</span>
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopclock</span><span class="special"><</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">high_resolution_clock</span> <span class="special">></span> <span class="identifier">high_resolution_stopclock</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopclock</span><span class="special"><</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">process_real_cpu_clock</span> <span class="special">></span> <span class="identifier">process_real_cpu_stopclock</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopclock</span><span class="special"><</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">process_user_cpu_clock</span> <span class="special">></span> <span class="identifier">process_user_cpu_stopclock</span><span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopclock</span><span class="special"><</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">process_system_cpu_clock</span> <span class="special">></span> <span class="identifier">process_system_cpu_stopclock</span><span class="special">;</span>
</pre>
-<p>
- The default places is given by default_places and is 3. The default format
- is "\n%d days(s) %h:%m:%s.%n\n", where
- </p>
-<div class="itemizedlist"><ul type="disc">
-<li>
-<code class="computeroutput"><span class="special">%</span><span class="identifier">d</span></code>
- : days
- </li>
-<li>
-<code class="computeroutput"><span class="special">%</span><span class="identifier">h</span></code>
- : hours
- </li>
-<li>
-<code class="computeroutput"><span class="special">%</span><span class="identifier">m</span></code>
- : minutes
- </li>
-<li>
-<code class="computeroutput"><span class="special">%</span><span class="identifier">s</span></code>
- : seconds
- </li>
-<li>
-<code class="computeroutput"><span class="special">%</span><span class="identifier">n</span></code>
- : nanoseconds
- </li>
-</ul></div>
</div>
</div>
</div>
@@ -741,7 +378,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="stopwatches.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="deprecated_headers.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="stopwatches.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="stopwatch_formatters.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/stopwatches.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/stopwatches.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/reference/stopwatches.html 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -96,7 +96,7 @@
is an instance of <code class="computeroutput"><span class="identifier">S</span></code>.
</p>
<div class="table">
-<a name="id4853554"></a><p class="title"><b>Table 2. Stopwatch Requirements</b></p>
+<a name="id4853463"></a><p class="title"><b>Table 2. Stopwatch Requirements</b></p>
<table class="table" summary="Stopwatch Requirements">
<colgroup>
<col>
@@ -386,9 +386,9 @@
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">chrono</span> <span class="special">{</span>
<span class="keyword">struct</span> <span class="identifier">dont_start_t</span><span class="special">;</span>
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">dont_start_t</span> <span class="identifier">dont_start</span><span class="special">;</span>
-
+
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">=</span><span class="identifier">high_resolution_clock</span><span class="special">></span> <span class="keyword">class</span> <span class="identifier">stopwatch</span><span class="special">;</span>
-
+
<span class="keyword">typedef</span> <span class="special"><</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">></span> <span class="identifier">system_stopwatch</span><span class="special">;</span>
<span class="preprocessor">#ifdef</span> <span class="identifier">BOOST_CHRONO_HAS_CLOCK_MONOTONIC</span>
<span class="keyword">typedef</span> <span class="special"><</span><span class="identifier">see</span> <span class="identifier">above</span><span class="special">></span> <span class="identifier">monotonic_stopwatch</span><span class="special">;</span>
@@ -443,11 +443,11 @@
<span class="identifier">time_point</span> <span class="identifier">resume</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">throws</span> <span class="special">);</span>
<span class="identifier">duration</span> <span class="identifier">elapsed</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">throws</span> <span class="special">);</span>
-
+
<span class="keyword">typedef</span> <span class="identifier">stopwatch_runner</span><span class="special"><</span><span class="identifier">stopwatch</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">></span> <span class="special">></span> <span class="identifier">scoped_run</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">stopwatch_suspender</span><span class="special"><</span><span class="identifier">stopwatch</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">></span> <span class="special">></span> <span class="identifier">scoped_suspend</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">stopwatch_resumer</span><span class="special"><</span><span class="identifier">stopwatch</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">></span> <span class="special">></span> <span class="identifier">scoped_resume</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">stopwatch_reporter</span><span class="special"><</span><span class="identifier">stopwatch</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">></span> <span class="special">></span> <span class="identifier">reporter</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">stopwatch_resumer</span><span class="special"><</span><span class="identifier">stopwatch</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">></span> <span class="special">></span> <span class="identifier">scoped_resume</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">stopwatch_reporter</span><span class="special"><</span><span class="identifier">stopwatch</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">></span> <span class="special">></span> <span class="identifier">reporter</span><span class="special">;</span>
<span class="special">};</span>
</pre>
@@ -481,7 +481,7 @@
<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopwatch</span><span class="special"><</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">monotonic_clock</span> <span class="special">></span> <span class="identifier">monotonic_stopwatch</span><span class="special">;</span>
<span class="preprocessor">#endif</span>
<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopwatch</span><span class="special"><</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">high_resolution_clock</span> <span class="special">></span> <span class="identifier">high_resolution_stopwatch</span><span class="special">;</span>
-
+
<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopwatch</span><span class="special"><</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">process_real_cpu_clock</span> <span class="special">></span> <span class="identifier">process_real_cpu_stopwatch</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopwatch</span><span class="special"><</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">process_user_cpu_clock</span> <span class="special">></span> <span class="identifier">process_user_cpu_stopwatch</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">stopwatch</span><span class="special"><</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">process_system_cpu_clock</span> <span class="special">></span> <span class="identifier">process_system_cpu_stopwatch</span><span class="special">;</span>
@@ -505,8 +505,8 @@
<span class="preprocessor">#ifdef</span> <span class="identifier">BOOST_CHRONO_HAS_CLOCK_MONOTONIC</span>
<span class="keyword">typedef</span> <span class="special"><</span><span class="identifier">see</span> <span class="identifier">below</span><span class="special">></span> <span class="identifier">monotonic_stopwatch_accumulator</span><span class="special">;</span>
<span class="preprocessor">#endif</span>
- <span class="keyword">typedef</span> <span class="special"><</span><span class="identifier">see</span> <span class="identifier">below</span><span class="special">></span> <span class="identifier">high_resolution_stopwatch_accumulator</span><span class="special">;</span>
-
+ <span class="keyword">typedef</span> <span class="special"><</span><span class="identifier">see</span> <span class="identifier">below</span><span class="special">></span> <span class="identifier">high_resolution_stopwatch_accumulator</span><span class="special">;</span>
+
<span class="keyword">typedef</span> <span class="special"><</span><span class="identifier">see</span> <span class="identifier">below</span><span class="special">></span> <span class="identifier">process_real_cpu_stopwatch_accumulator</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="special"><</span><span class="identifier">see</span> <span class="identifier">below</span><span class="special">></span> <span class="identifier">process_user_cpu_stopwatch_accumulator</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="special"><</span><span class="identifier">see</span> <span class="identifier">below</span><span class="special">></span> <span class="identifier">process_system_cpu_stopwatch_accumulator</span><span class="special">;</span>
@@ -556,19 +556,19 @@
<span class="identifier">time_point</span> <span class="identifier">start</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">throws</span> <span class="special">);</span>
<span class="identifier">duration</span> <span class="identifier">stop</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">throws</span> <span class="special">);</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">duration</span><span class="special">,</span><span class="identifier">time_point</span><span class="special">></span> <span class="identifier">restart</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">throws</span> <span class="special">);</span>
-
+
<span class="identifier">duration</span> <span class="identifier">suspend</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">throws</span> <span class="special">);</span>
<span class="identifier">time_point</span> <span class="identifier">resume</span><span class="special">(</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">throws</span> <span class="special">);</span>
-
+
<span class="identifier">duration</span> <span class="identifier">elapsed</span><span class="special">(</span><span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&</span> <span class="identifier">ec</span> <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">throws</span><span class="special">);</span>
-
+
<span class="identifier">accumulator</span><span class="special">&</span> <span class="identifier">accumulated</span><span class="special">(</span> <span class="special">);</span>
<span class="keyword">void</span> <span class="identifier">reset</span><span class="special">();</span>
-
+
<span class="keyword">typedef</span> <span class="identifier">stopwatch_runner</span><span class="special"><</span><span class="identifier">stopwatch_accumulator</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">></span> <span class="special">></span> <span class="identifier">scoped_run</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">stopwatch_suspender</span><span class="special"><</span><span class="identifier">stopwatch_accumulator</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">></span> <span class="special">></span> <span class="identifier">scoped_suspend</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">stopwatch_resumer</span><span class="special"><</span><span class="identifier">stopwatch_accumulator</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">></span> <span class="special">></span> <span class="identifier">scoped_resume</span><span class="special">;</span>
- <span class="keyword">typedef</span> <span class="identifier">stopwatch_reporter</span><span class="special"><</span><span class="identifier">stopwatch_accumulator</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">></span> <span class="special">></span> <span class="identifier">reporter</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">stopwatch_resumer</span><span class="special"><</span><span class="identifier">stopwatch_accumulator</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">></span> <span class="special">></span> <span class="identifier">scoped_resume</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">stopwatch_reporter</span><span class="special"><</span><span class="identifier">stopwatch_accumulator</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">></span> <span class="special">></span> <span class="identifier">reporter</span><span class="special">;</span>
<span class="special">};</span>
</pre>
<div class="section" lang="en">
@@ -830,9 +830,9 @@
<span class="keyword">static</span> <span class="identifier">stopwatch_accumulator</span><span class="special"><></span> <span class="identifier">t</span><span class="special">;</span>
<span class="identifier">stopwatch_runner</span><span class="special"><</span><span class="identifier">stopwatch_accumulator</span><span class="special"><></span> <span class="special">></span> <span class="identifier">_</span><span class="special">(</span><span class="identifier">t</span><span class="special">);</span>
<span class="comment">// ...
-</span>
+</span>
<span class="comment">// call to some function we don't want to measure
-</span> <span class="special">{</span>
+</span> <span class="special">{</span>
<span class="identifier">stopwatch_suspender</span><span class="special"><</span><span class="identifier">stopwatch_accumulator</span><span class="special"><></span> <span class="special">></span> <span class="identifier">_</span><span class="special">(</span><span class="identifier">t</span><span class="special">);</span>
<span class="identifier">external_function</span><span class="special">();</span>
<span class="special">}</span>
@@ -868,14 +868,14 @@
<span class="keyword">static</span> <span class="identifier">stopwatch_accumulator</span><span class="special"><></span> <span class="identifier">t</span><span class="special">;</span>
<span class="identifier">stopwatch_runner</span><span class="special"><</span><span class="identifier">stopwatch_accumulator</span><span class="special"><></span> <span class="special">></span> <span class="identifier">_</span><span class="special">(</span><span class="identifier">t</span><span class="special">);</span>
<span class="comment">// ...
-</span>
+</span>
<span class="comment">// call to some function we don't want to measure
-</span> <span class="special">{</span>
+</span> <span class="special">{</span>
<span class="identifier">stopwatch_suspender</span><span class="special"><</span><span class="identifier">stopwatch_accumulator</span><span class="special"><></span> <span class="special">></span> <span class="identifier">_</span><span class="special">(</span><span class="identifier">t</span><span class="special">);</span>
-
+
<span class="special">{</span>
<span class="identifier">stopwatch_resumer</span><span class="special"><</span><span class="identifier">stopwatch_accumulator</span><span class="special"><></span> <span class="special">></span> <span class="identifier">_</span><span class="special">(</span><span class="identifier">t</span><span class="special">);</span>
-
+
<span class="special">}</span>
<span class="special">}</span>
<span class="special">}</span>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide.html 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -35,11 +35,8 @@
World! </a></span></dt>
</dl></dd>
<dt><span class="section">Tutorial</span></dt>
-<dd><dl>
-<dt><span class="section">Tutorial</span></dt>
-<dt><span class="section"><a href="users_guide/tutorial.html#boost_chrono.users_guide.tutorial.thread_clock">thread
- clock</a></span></dt>
-</dl></dd>
+<dd><dl><dt><span class="section"><a href="users_guide/tutorial.html#boost_chrono.users_guide.tutorial.thread_clock">thread
+ clock</a></span></dt></dl></dd>
<dt><span class="section"> References</span></dt>
</dl></div>
</div>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide/getting_started.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide/getting_started.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide/getting_started.html 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -39,7 +39,7 @@
Installing Chrono</a>
</h4></div></div></div>
<a name="boost_chrono.users_guide.getting_started.install.getting__emphasis_role__bold__boost_chrono__emphasis__"></a><h5>
-<a name="id4817442"></a>
+<a name="id4817373"></a>
<a href="getting_started.html#boost_chrono.users_guide.getting_started.install.getting__emphasis_role__bold__boost_chrono__emphasis__">Getting
<span class="bold"><strong>Boost.Chrono</strong></span> </a>
</h5>
@@ -53,7 +53,7 @@
Sandbox</a>.
</p>
<a name="boost_chrono.users_guide.getting_started.install.where_to_install__emphasis_role__bold__boost_chrono__emphasis___"></a><h5>
-<a name="id4817502"></a>
+<a name="id4817434"></a>
<a href="getting_started.html#boost_chrono.users_guide.getting_started.install.where_to_install__emphasis_role__bold__boost_chrono__emphasis___">Where
to install <span class="bold"><strong>Boost.Chrono</strong></span>? </a>
</h5>
@@ -69,7 +69,7 @@
variable. Any help is welcome.
</p>
<a name="boost_chrono.users_guide.getting_started.install.building__emphasis_role__bold__boost_chrono__emphasis__"></a><h5>
-<a name="id4817545"></a>
+<a name="id4817476"></a>
<a href="getting_started.html#boost_chrono.users_guide.getting_started.install.building__emphasis_role__bold__boost_chrono__emphasis__">Building
<span class="bold"><strong>Boost.Chrono</strong></span> </a>
</h5>
@@ -80,7 +80,7 @@
<pre class="programlisting"><span class="identifier">bjam</span> <span class="identifier">libs</span><span class="special">/</span><span class="identifier">chrono</span><span class="special">/</span><span class="identifier">build</span>
</pre>
<a name="boost_chrono.users_guide.getting_started.install.requirements"></a><h5>
-<a name="id4817613"></a>
+<a name="id4817544"></a>
<a href="getting_started.html#boost_chrono.users_guide.getting_started.install.requirements">Requirements</a>
</h5>
<p>
@@ -129,7 +129,7 @@
</dl>
</div>
<a name="boost_chrono.users_guide.getting_started.install.building_an_executable_that_uses__emphasis_role__bold__boost_chrono__emphasis__"></a><h5>
-<a name="id4817813"></a>
+<a name="id4817745"></a>
<a href="getting_started.html#boost_chrono.users_guide.getting_started.install.building_an_executable_that_uses__emphasis_role__bold__boost_chrono__emphasis__">Building
an executable that uses <span class="bold"><strong>Boost.Chrono</strong></span>
</a>
@@ -139,7 +139,7 @@
with the Boost System library.
</p>
<a name="boost_chrono.users_guide.getting_started.install.exceptions_safety_"></a><h5>
-<a name="id4817849"></a>
+<a name="id4817781"></a>
<a href="getting_started.html#boost_chrono.users_guide.getting_started.install.exceptions_safety_">Exceptions
safety </a>
</h5>
@@ -148,7 +148,7 @@
of exception safety as long as the underlying parameters provide it.
</p>
<a name="boost_chrono.users_guide.getting_started.install.thread_safety_"></a><h5>
-<a name="id4817876"></a>
+<a name="id4817808"></a>
<a href="getting_started.html#boost_chrono.users_guide.getting_started.install.thread_safety_">Thread
safety </a>
</h5>
@@ -156,7 +156,7 @@
All functions in the library are thread-unsafe except when noted explicitly.
</p>
<a name="boost_chrono.users_guide.getting_started.install.tested_compilers_"></a><h5>
-<a name="id4817900"></a>
+<a name="id4817832"></a>
<a href="getting_started.html#boost_chrono.users_guide.getting_started.install.tested_compilers_">Tested
compilers </a>
</h5>
Modified: sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide/tutorial.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide/tutorial.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/boost_chrono/users_guide/tutorial.html 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -26,14 +26,8 @@
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_chrono.users_guide.tutorial"></a>Tutorial
</h3></div></div></div>
-<div class="toc"><dl>
-<dt><span class="section">Tutorial</span></dt>
-<dt><span class="section"><a href="tutorial.html#boost_chrono.users_guide.tutorial.thread_clock">thread
- clock</a></span></dt>
-</dl></div>
-<div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title">
-<a name="boost_chrono.users_guide.tutorial.tutorial"></a>Tutorial
-</h4></div></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="tutorial.html#boost_chrono.users_guide.tutorial.thread_clock">thread
+ clock</a></span></dt></dl></div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_chrono.users_guide.tutorial.thread_clock"></a><a href="tutorial.html#boost_chrono.users_guide.tutorial.thread_clock" title="thread
Modified: sandbox/chrono/libs/chrono/doc/html/index.html
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/index.html (original)
+++ sandbox/chrono/libs/chrono/doc/html/index.html 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -69,6 +69,8 @@
<dt><span class="section">Stopwatches</span></dt>
<dt><span class="section"><a href="boost_chrono/reference/stopwatch_reporters.html">Stopwatch
Reporters</a></span></dt>
+<dt><span class="section"><a href="boost_chrono/reference/stopwatch_formatters.html">Stopwatch
+ Formatters</a></span></dt>
<dt><span class="section"><a href="boost_chrono/reference/deprecated_headers.html">Deprecated
Headers</a></span></dt>
</dl></dd>
@@ -120,7 +122,7 @@
</table></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: January 13, 2010 at 22:42:00 GMT</small></p></td>
+<td align="left"><p><small>Last revised: January 16, 2010 at 08:27:37 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
Modified: sandbox/chrono/libs/chrono/doc/html/standalone_HTML.manifest
==============================================================================
--- sandbox/chrono/libs/chrono/doc/html/standalone_HTML.manifest (original)
+++ sandbox/chrono/libs/chrono/doc/html/standalone_HTML.manifest 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -11,6 +11,7 @@
boost_chrono/reference/process_cpu_related.html
boost_chrono/reference/stopwatches.html
boost_chrono/reference/stopwatch_reporters.html
+boost_chrono/reference/stopwatch_formatters.html
boost_chrono/reference/deprecated_headers.html
boost_chrono/examples.html
boost_chrono/examples/si_units.html
Added: sandbox/chrono/libs/chrono/example/digital_time_example.cpp
==============================================================================
--- (empty file)
+++ sandbox/chrono/libs/chrono/example/digital_time_example.cpp 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -0,0 +1,35 @@
+// digital_time_example.cpp ---------------------------------------------------//
+
+// Copyright Beman Dawes 2006, 2008
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+// See http://www.boost.org/libs/chrono for documentation.
+
+#include <boost/chrono/stopwatch.hpp>
+#include <boost/chrono/stopwatch_reporter.hpp>
+#include <boost/chrono/process_cpu_clocks.hpp>
+#include <boost/chrono/digital_time_formatter.hpp>
+#include <cmath>
+
+
+using namespace boost::chrono;
+int f1(long j)
+{
+ stopwatch_reporter<stopwatch<process_real_cpu_clock>, digital_time_formatter> hhmmss;
+
+ for ( long i = 0; i < j; ++i )
+ std::sqrt( 123.456L ); // burn some time
+
+ return 0;
+}
+int main()
+{
+ stopwatch_reporter<stopwatch<process_real_cpu_clock>, digital_time_formatter> hhmmss();
+
+ f1(100000);
+ f1(200000);
+ f1(300000);
+ return 0;
+}
Added: sandbox/chrono/libs/chrono/example/stopclock_example.cpp
==============================================================================
--- (empty file)
+++ sandbox/chrono/libs/chrono/example/stopclock_example.cpp 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -0,0 +1,31 @@
+// stopclock_example.cpp ---------------------------------------------------//
+
+// Copyright Beman Dawes 2006, 2008
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+// See http://www.boost.org/libs/chrono for documentation.
+
+#include <boost/chrono/stopclock.hpp>
+#include <cmath>
+
+using namespace boost::chrono;
+int f1(long j)
+{
+ stopclock<> _;
+
+ for ( long i = 0; i < j; ++i )
+ std::sqrt( 123.456L ); // burn some time
+
+ return 0;
+}
+int main()
+{
+ stopclock<> _("\nmain %ds\n");
+
+ f1(100000);
+ f1(200000);
+ f1(300000);
+ return 0;
+}
Added: sandbox/chrono/libs/chrono/example/stopwatch_accumulator_example.cpp
==============================================================================
--- (empty file)
+++ sandbox/chrono/libs/chrono/example/stopwatch_accumulator_example.cpp 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -0,0 +1,34 @@
+// stopwatch_accumulator_example.cpp ---------------------------------------------------//
+
+// Copyright Beman Dawes 2006, 2008
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+// See http://www.boost.org/libs/chrono for documentation.
+
+#include <boost/chrono/stopwatch_accumulator.hpp>
+#include <boost/chrono/process_cpu_clocks.hpp>
+#include <cmath>
+
+
+using namespace boost::chrono;
+int f1(long j)
+{
+ static stopwatch_accumulator<process_real_cpu_clock>::reporter acc(
+ "\nf1 Count=%c times Sum=%ss Min=%ms Max=%Ms Mean=%as\n");
+ stopwatch_accumulator<process_real_cpu_clock>::reporter::scoped_run _(acc);
+
+ for ( long i = 0; i < j; ++i )
+ std::sqrt( 123.456L ); // burn some time
+
+ return 0;
+}
+int main()
+{
+
+ f1(100000);
+ f1(200000);
+ f1(300000);
+ return 0;
+}
Modified: sandbox/chrono/libs/chrono/example/stopwatch_example.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/example/stopwatch_example.cpp (original)
+++ sandbox/chrono/libs/chrono/example/stopwatch_example.cpp 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -1,4 +1,4 @@
-// run_timer_example.cpp ---------------------------------------------------//
+// stopwatch_example.cpp ---------------------------------------------------//
// Copyright Beman Dawes 2006, 2008
@@ -7,30 +7,14 @@
// See http://www.boost.org/libs/chrono for documentation.
-#include <iostream>
-#include <boost/chrono/process_times.hpp>
#include <boost/chrono/stopwatch.hpp>
-#include <boost/chrono/stopclock.hpp>
-#include <boost/chrono/stopwatch_accumulator.hpp>
-#include <boost/chrono/process_cpu_clocks.hpp>
-#include <boost/chrono/time_formatter.hpp>
-#include <boost/chrono/digital_time_formatter.hpp>
#include <cmath>
-
using namespace boost::chrono;
int f1(long j)
{
- static stopwatch_accumulator<process_real_cpu_clock>::reporter t(
- "\nf1 Count=%c times Sum=%ss Min=%ms Max=%Ms Mean=%as\n");
- stopwatch_accumulator<process_real_cpu_clock>::reporter::scoped_run _(t);
- stopwatch<process_real_cpu_clock>::reporter x("\nF1 %dsec\n");
+ stopwatch<>::reporter x("\nf1 %ds\n");
- run_timer y;
- stopclock<> z;
- stopwatch_reporter<stopwatch<process_real_cpu_clock>, digital_time_formatter> hhmmss;
-
-
for ( long i = 0; i < j; ++i )
std::sqrt( 123.456L ); // burn some time
@@ -38,9 +22,7 @@
}
int main()
{
- stopwatch<boost::chrono::process_real_cpu_clock>::reporter _("\nMain %dsec\n");
- run_timer z;
-
+ stopwatch<>::reporter _("\nMain %ds\n");
f1(100000);
f1(200000);
Modified: sandbox/chrono/libs/chrono/src/mac/process_clock.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/src/mac/process_clock.cpp (original)
+++ sandbox/chrono/libs/chrono/src/mac/process_clock.cpp 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -51,7 +51,7 @@
namespace chrono
{
- void process_clocks::now( process_times & times_, system::error_code & ec )
+ void process_clock::now( process_times & times_, system::error_code & ec )
{
tms tm;
Modified: sandbox/chrono/libs/chrono/src/posix/process_clock.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/src/posix/process_clock.cpp (original)
+++ sandbox/chrono/libs/chrono/src/posix/process_clock.cpp 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -44,7 +44,7 @@
namespace boost { namespace chrono {
- void process_clocks::now( process_times & times_, system::error_code & ec ) {
+ void process_clock::now( process_times & times_, system::error_code & ec ) {
tms tm;
clock_t c = ::times( &tm );
Modified: sandbox/chrono/libs/chrono/src/process_clock.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/src/process_clock.cpp (original)
+++ sandbox/chrono/libs/chrono/src/process_clock.cpp 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -39,7 +39,7 @@
#endif // POSIX
namespace boost { namespace chrono {
- void process_clocks::now( time_points & tps, system::error_code & ec ) {
+ void process_clock::now( time_points & tps, system::error_code & ec ) {
process_times t;
process_clock::now(t,ec);
tps.real=process_clock::time_point(t.real);
Modified: sandbox/chrono/libs/chrono/src/process_cpu_clocks.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/src/process_cpu_clocks.cpp (original)
+++ sandbox/chrono/libs/chrono/src/process_cpu_clocks.cpp 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -1,6 +1,6 @@
// boost process_cpu_clocks.cpp -----------------------------------------------------------//
-// Copyright Beman Dawes 1994, 2006, 2008
+// Copyright 2009-2010 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
Modified: sandbox/chrono/libs/chrono/src/run_timer.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/src/run_timer.cpp (original)
+++ sandbox/chrono/libs/chrono/src/run_timer.cpp 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -1,4 +1,4 @@
-// boost process_stopwatches_reporter.cpp ---------------------------------------------------------------//
+// boost run_timer.cpp ---------------------------------------------------------------//
// Copyright Beman Dawes 1994, 2006, 2008
// Copyright 2009-2010 Vicente J. Botet Escriba
@@ -93,43 +93,43 @@
{
- process_stopwatches_reporter::process_stopwatches_reporter( system::error_code & ec )
+ run_timer::run_timer( system::error_code & ec )
: m_places(m_default_places), m_os(m_cout()) { start(ec); }
- process_stopwatches_reporter::process_stopwatches_reporter( std::ostream & os,
+ run_timer::run_timer( std::ostream & os,
system::error_code & ec )
: m_places(m_default_places), m_os(os) { start(ec); }
- process_stopwatches_reporter::process_stopwatches_reporter( const std::string & format,
+ run_timer::run_timer( const std::string & format,
system::error_code & ec )
: m_places(m_default_places), m_os(m_cout()), m_format(format) { start(ec); }
- process_stopwatches_reporter::process_stopwatches_reporter( std::ostream & os, const std::string & format,
+ run_timer::run_timer( std::ostream & os, const std::string & format,
system::error_code & ec )
: m_places(m_default_places), m_os(os), m_format(format) { start(ec); }
- process_stopwatches_reporter::process_stopwatches_reporter( const std::string & format, int places,
+ run_timer::run_timer( const std::string & format, int places,
system::error_code & ec )
: m_places(places), m_os(m_cout()), m_format(format) { start(ec); }
- process_stopwatches_reporter::process_stopwatches_reporter( std::ostream & os, const std::string & format,
+ run_timer::run_timer( std::ostream & os, const std::string & format,
int places, system::error_code & ec )
: m_places(places), m_os(os), m_format(format) { start(ec); }
- process_stopwatches_reporter::process_stopwatches_reporter( int places,
+ run_timer::run_timer( int places,
system::error_code & ec )
: m_places(places), m_os(m_cout()) { start(ec); }
- process_stopwatches_reporter::process_stopwatches_reporter( std::ostream & os, int places,
+ run_timer::run_timer( std::ostream & os, int places,
system::error_code & ec )
: m_places(places), m_os(os) { start(ec); }
- process_stopwatches_reporter::process_stopwatches_reporter( int places, const std::string & format,
+ run_timer::run_timer( int places, const std::string & format,
system::error_code & ec )
: m_places(places), m_os(m_cout()), m_format(format) { start(ec); }
- process_stopwatches_reporter::process_stopwatches_reporter( std::ostream & os, int places, const std::string & format,
+ run_timer::run_timer( std::ostream & os, int places, const std::string & format,
system::error_code & ec )
: m_places(places), m_os(os), m_format(format) { start(ec); }
- // process_stopwatches_reporter::report -------------------------------------------------------------//
+ // run_timer::report -------------------------------------------------------------//
- void process_stopwatches_reporter::report( system::error_code & ec )
+ void run_timer::report( system::error_code & ec )
{
m_reported = true;
if ( m_format.empty() ) m_format = default_format;
@@ -157,9 +157,9 @@
}
}
- // process_stopwatches_reporter::test_report --------------------------------------------------------//
+ // run_timer::test_report --------------------------------------------------------//
- void process_stopwatches_reporter::test_report( duration real_, duration user_, duration system_ )
+ void run_timer::test_report( duration real_, duration user_, duration system_ )
{
if ( m_format.empty() ) m_format = default_format;
Modified: sandbox/chrono/libs/chrono/src/run_timer_static.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/src/run_timer_static.cpp (original)
+++ sandbox/chrono/libs/chrono/src/run_timer_static.cpp 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -29,7 +29,7 @@
namespace chrono
{
- std::ostream & process_stopwatches_reporter::m_cout() { return std::cout; }
+ std::ostream & run_timer::m_cout() { return std::cout; }
} // namespace chrono
} // namespace boost
Modified: sandbox/chrono/libs/chrono/src/win/process_clock.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/src/win/process_clock.cpp (original)
+++ sandbox/chrono/libs/chrono/src/win/process_clock.cpp 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -25,7 +25,7 @@
namespace chrono
{
- void process_clocks::now( process_times & times_, system::error_code & ec )
+ void process_clock::now( process_times & times_, system::error_code & ec )
{
// note that Windows uses 100 nanosecond ticks for FILETIME
Modified: sandbox/chrono/libs/chrono/test/Jamfile.v2
==============================================================================
--- sandbox/chrono/libs/chrono/test/Jamfile.v2 (original)
+++ sandbox/chrono/libs/chrono/test/Jamfile.v2 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -92,4 +92,10 @@
:
[ run ../example/stopwatch_example.cpp : : : <link>static ]
[ run ../example/stopwatch_example.cpp : : : <library>/boost/system//boost_system : stopwatch_example_dll ]
+ [ run ../example/stopwatch_accumulator_example.cpp : : : <link>static ]
+ [ run ../example/stopwatch_accumulator_example.cpp : : : <library>/boost/system//boost_system : stopwatch_accumulator_example_dll ]
+ [ run ../example/stopclock_example.cpp : : : <link>static ]
+ [ run ../example/stopclock_example.cpp : : : <library>/boost/system//boost_system : stopclock_example_dll ]
+ [ run ../example/digital_time_example.cpp : : : <link>static ]
+ [ run ../example/digital_time_example.cpp : : : <library>/boost/system//boost_system : digital_time_example_dll ]
;
\ No newline at end of file
Modified: sandbox/chrono/libs/chrono/test/miscellaneous.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/miscellaneous.cpp (original)
+++ sandbox/chrono/libs/chrono/test/miscellaneous.cpp 2010-01-16 07:58:57 EST (Sat, 16 Jan 2010)
@@ -152,7 +152,7 @@
inspect_duration(milliseconds(3) * 2.5, "milliseconds(3) * 2.5");
std::cout << d.count() << '\n';
// milliseconds ms(3.5); // doesn't compile
- std::cout << "milliseconds ms(3.5) doesn't compile\n";
+// std::cout << "milliseconds ms(3.5) doesn't compile\n";
return 0;
}
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