Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58990 - sandbox/chrono/boost/chrono
From: vicente.botet_at_[hidden]
Date: 2010-01-13 18:01:50


Author: viboes
Date: 2010-01-13 18:01:49 EST (Wed, 13 Jan 2010)
New Revision: 58990
URL: http://svn.boost.org/trac/boost/changeset/58990

Log:
Boost.Chrono: Version 0.3.0,
* Change default format for accumulators
* Set default formatter for stopwatch<process_cpu_clock>
Text files modified:
   sandbox/chrono/boost/chrono/process_cpu_clocks.hpp | 6 +++---
   sandbox/chrono/boost/chrono/stopwatch_accumulator_formatter.hpp | 2 +-
   sandbox/chrono/boost/chrono/time_formatter.hpp | 6 ++++++
   3 files changed, 10 insertions(+), 4 deletions(-)

Modified: sandbox/chrono/boost/chrono/process_cpu_clocks.hpp
==============================================================================
--- sandbox/chrono/boost/chrono/process_cpu_clocks.hpp (original)
+++ sandbox/chrono/boost/chrono/process_cpu_clocks.hpp 2010-01-13 18:01:49 EST (Wed, 13 Jan 2010)
@@ -125,7 +125,7 @@
     struct duration_values<process_cpu_clock::times>
     {
         typedef process_cpu_clock::times Rep;
- public:
+ public:
         static Rep zero() {return Rep();}
         static Rep max BOOST_PREVENT_MACRO_SUBSTITUTION () {
           return Rep((std::numeric_limits<process_real_cpu_clock::rep>::max)(),
@@ -137,11 +137,11 @@
                       (std::numeric_limits<process_user_cpu_clock::rep>::min)(),
                       (std::numeric_limits<process_system_cpu_clock::rep>::min)());
         }
- };
+ };
     
 } // namespace chrono
 } // namespace boost
 
 #include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
 
-#endif // BOOST_PROCESS_TIMES_HPP
+#endif // BOOST_CHRONO_PROCESS_CPU_CLOCKS_HPP

Modified: sandbox/chrono/boost/chrono/stopwatch_accumulator_formatter.hpp
==============================================================================
--- sandbox/chrono/boost/chrono/stopwatch_accumulator_formatter.hpp (original)
+++ sandbox/chrono/boost/chrono/stopwatch_accumulator_formatter.hpp 2010-01-13 18:01:49 EST (Wed, 13 Jan 2010)
@@ -93,7 +93,7 @@
             }
         }
     };
- const char * stopwatch_accumulator_formatter::default_format ="\nCount=%c times Sum=%ss Min=%ms Max=%Ms Mean=%as\n";
+ const char * stopwatch_accumulator_formatter::default_format ="\n%c times, sum=%ss, min=%ms, max=%Ms, mean=%as\n";
     std::ostream & stopwatch_accumulator_formatter::m_cout() { return std::cout; }
     
 } // namespace chrono

Modified: sandbox/chrono/boost/chrono/time_formatter.hpp
==============================================================================
--- sandbox/chrono/boost/chrono/time_formatter.hpp (original)
+++ sandbox/chrono/boost/chrono/time_formatter.hpp 2010-01-13 18:01:49 EST (Wed, 13 Jan 2010)
@@ -103,6 +103,12 @@
 
     
     std::ostream & time_formatter::m_cout() { return std::cout; }
+
+ template <>
+ struct stopwatch_reporter_default_formatter<stopwatch<process_cpu_clock> > {
+ typedef time_formatter type;
+ };
+
 
   } // namespace chrono
 } // namespace boost


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