|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r58987 - sandbox/chrono/libs/chrono/example
From: vicente.botet_at_[hidden]
Date: 2010-01-13 16:43:42
Author: viboes
Date: 2010-01-13 16:43:42 EST (Wed, 13 Jan 2010)
New Revision: 58987
URL: http://svn.boost.org/trac/boost/changeset/58987
Log:
Boost.Chrono: Version 0.3.0,
* Added test on stopwatch_reporter<stopwatch<process_cpu_clock>, time_formatter>
Text files modified:
sandbox/chrono/libs/chrono/example/stopwatch_example.cpp | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
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-13 16:43:42 EST (Wed, 13 Jan 2010)
@@ -12,6 +12,7 @@
#include <boost/chrono/stopwatch.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>
@@ -22,8 +23,13 @@
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<boost::chrono::process_real_cpu_clock>::reporter x("\nF1 %dsec\n");
+ stopwatch<process_real_cpu_clock>::reporter x("\nF1 %dsec\n");
+
+#if 0
run_timer y;
+#else
+ stopwatch_reporter<stopwatch<process_cpu_clock>, time_formatter> y;
+#endif
stopwatch_reporter<stopwatch<process_real_cpu_clock>, digital_time_formatter> hhmmss;
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