[chrono] v0.3 New Stopwatch Feature

Hi, I'm pleased to announce the new version of the Boost.Chrono library. The implementaton is quite stable; the new interface could suffer of some modifications, renaming, ... as far as you submit some proposals. I would request a formal review soon and I will need a review manager. I know that review managers are hard to find, so if you are interested in the library, please the Review Wizards. The library can be downloaded from http://www.boostpro.com/vault/index.php?action=downloadfile&filename=chrono.zip&directory=System& and the documentation is online on the sandbox http://svn.boost.org/svn/boost/sandbox/chrono/libs/chrono/doc/html/index.htm.... I've tested it with gcc and MSVC. Previoous version of the library have been testted on Mac, but I'm not able to test this platform. Could someone check if there are some regressions on Mac? New Features: * Process cpu clocks * Independent process cpu clocks for real, user, system process CPU time * Global process cpu clock for real, user, system process CPU time * Stopwatch concept measuring elapsed time between different points in time associated to the operations start, stop, suspend and resume. * stopwatch is a model Stopwatch measuring the elapsed time between the start and the stop operations. * stopwatch_accumulator is a model Stopwatch allowing to accumulate several time samples and give the average, ... * Scoped helper classes allowing to pairwise start/stop operations, suspend/resume and resume/suspend a Stopwatch. * Stopwatch Formatter concept * stopwatch formatter "%ds\n" * stopwatch accumulator formatter "%c times, sum%ss, min%ms, max%Ms, mean%as\n" * time formatter "real %rs, cpu %cs (%p%), user %us, system %ss\n" * digital_time decomposition class separating days, hours,minutes,seconds, nanoseconds from any duration class (looking for a better name) * digital_time formatter "%d days(s) %h:%m:%s.%n\n" * stopwatch_reporter is a convenient generic class reporting elapsed time for the Stopwatch concept. * stopclock<Clock> shortcut stopwatch_reporter<stopwatch<Clcok>> * typeof registration for classes duration and time_point Depreceated Features: * The classes process_times, process_clock, process_timer, timer and run_timer are now deprecated as the preceding additions are more generic. However for backward compatibility they are preserved until inclusion of the library in Boost. Next follows the equivalences: timer<> ~ stopwatch<> process_timer ~ stopwatch<process_cpu_clock> run_timer ~ stopclock<> Bug Fixes * Try to correct warning C4251: 'boost::chrono::run_timer::m_format' : class 'std::basic_string<_Elem,_Traits,_Ax>' needs to have dll-interface to be used by clients of class 'boost::chrono::run_timer', by don't including inlines functions using the std::string m_format. For people that doesn't know it yet, Boost.Chrono library provides: * The C++0x Standard Library's common_type. * The C++0x Standard Library's compile-time rational arithmetic. * The C++0x Standard Library's time utilities, including: * Class template duration * Class template time_point * Clocks: * system_clock * monotonic_clock * high_resolution_clock * typeof registration for classes duration and time_point * Process clocks: * 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_cpu_clock, tuple-like class capturing at once real, user-CPU, and system-CPU times. * Stopwatches: * stopwatch, capturing elapsed Clock times. * stopwatch_accumulator, capturing cummulated elapsed Clock times. * scoped helper classes allowing to pairwise start/stop operations, suspend/resume and resume/suspend a Stopwatch. * Stopclocks or Stopwatch reporters: * stopwatch_reporter, convenient reporting of models of Stopwatch results. * stopclock<Clock> shortcut of stopwatch_reporter<stopwatch<Clock>> Best regards, _____________________ Vicente Juan Botet Escribá

Hi, I'm reading the documentation of this interesting library, and noticed that there is an example missing, the first in the StopWatched part of the Motivation page. On Sun, Jan 17, 2010 at 21:14, vicente.botet <vicente.botet@wanadoo.fr>wrote:
Hi,
I'm pleased to announce the new version of the Boost.Chrono library. The implementaton is quite stable; the new interface could suffer of some modifications, renaming, ... as far as you submit some proposals. I would request a formal review soon and I will need a review manager. I know that review managers are hard to find, so if you are interested in the library, please the Review Wizards.
The library can be downloaded from http://www.boostpro.com/vault/index.php?action=downloadfile&filename=chrono.zip&directory=System&and the documentation is online on the sandbox http://svn.boost.org/svn/boost/sandbox/chrono/libs/chrono/doc/html/index.htm... .
I've tested it with gcc and MSVC. Previoous version of the library have been testted on Mac, but I'm not able to test this platform. Could someone check if there are some regressions on Mac?
New Features: * Process cpu clocks * Independent process cpu clocks for real, user, system process CPU time * Global process cpu clock for real, user, system process CPU time * Stopwatch concept measuring elapsed time between different points in time associated to the operations start, stop, suspend and resume. * stopwatch is a model Stopwatch measuring the elapsed time between the start and the stop operations. * stopwatch_accumulator is a model Stopwatch allowing to accumulate several time samples and give the average, ... * Scoped helper classes allowing to pairwise start/stop operations, suspend/resume and resume/suspend a Stopwatch. * Stopwatch Formatter concept * stopwatch formatter "%ds\n" * stopwatch accumulator formatter "%c times, sum%ss, min%ms, max%Ms, mean%as\n" * time formatter "real %rs, cpu %cs (%p%), user %us, system %ss\n" * digital_time decomposition class separating days, hours,minutes,seconds, nanoseconds from any duration class (looking for a better name) * digital_time formatter "%d days(s) %h:%m:%s.%n\n" * stopwatch_reporter is a convenient generic class reporting elapsed time for the Stopwatch concept. * stopclock<Clock> shortcut stopwatch_reporter<stopwatch<Clcok>> * typeof registration for classes duration and time_point
Depreceated Features: * The classes process_times, process_clock, process_timer, timer and run_timer are now deprecated as the preceding additions are more generic. However for backward compatibility they are preserved until inclusion of the library in Boost. Next follows the equivalences: timer<> ~ stopwatch<> process_timer ~ stopwatch<process_cpu_clock> run_timer ~ stopclock<>
Bug Fixes * Try to correct warning C4251: 'boost::chrono::run_timer::m_format' : class 'std::basic_string<_Elem,_Traits,_Ax>' needs to have dll-interface to be used by clients of class 'boost::chrono::run_timer', by don't including inlines functions using the std::string m_format.
For people that doesn't know it yet, Boost.Chrono library provides: * The C++0x Standard Library's common_type. * The C++0x Standard Library's compile-time rational arithmetic. * The C++0x Standard Library's time utilities, including: * Class template duration * Class template time_point * Clocks: * system_clock * monotonic_clock * high_resolution_clock * typeof registration for classes duration and time_point * Process clocks: * 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_cpu_clock, tuple-like class capturing at once real, user-CPU, and system-CPU times. * Stopwatches: * stopwatch, capturing elapsed Clock times. * stopwatch_accumulator, capturing cummulated elapsed Clock times. * scoped helper classes allowing to pairwise start/stop operations, suspend/resume and resume/suspend a Stopwatch. * Stopclocks or Stopwatch reporters: * stopwatch_reporter, convenient reporting of models of Stopwatch results. * stopclock<Clock> shortcut of stopwatch_reporter<stopwatch<Clock>>
Best regards, _____________________ Vicente Juan Botet Escribá
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

To be clear, it's the output that's missing. On Mon, Jan 18, 2010 at 14:58, Klaim <mjklaim@gmail.com> wrote:
Hi,
I'm reading the documentation of this interesting library, and noticed that there is an example missing, the first in the StopWatched part of the Motivation page.
On Sun, Jan 17, 2010 at 21:14, vicente.botet <vicente.botet@wanadoo.fr>wrote:
Hi,
I'm pleased to announce the new version of the Boost.Chrono library. The implementaton is quite stable; the new interface could suffer of some modifications, renaming, ... as far as you submit some proposals. I would request a formal review soon and I will need a review manager. I know that review managers are hard to find, so if you are interested in the library, please the Review Wizards.
The library can be downloaded from http://www.boostpro.com/vault/index.php?action=downloadfile&filename=chrono.zip&directory=System&and the documentation is online on the sandbox http://svn.boost.org/svn/boost/sandbox/chrono/libs/chrono/doc/html/index.htm... .
I've tested it with gcc and MSVC. Previoous version of the library have been testted on Mac, but I'm not able to test this platform. Could someone check if there are some regressions on Mac?
New Features: * Process cpu clocks * Independent process cpu clocks for real, user, system process CPU time * Global process cpu clock for real, user, system process CPU time * Stopwatch concept measuring elapsed time between different points in time associated to the operations start, stop, suspend and resume. * stopwatch is a model Stopwatch measuring the elapsed time between the start and the stop operations. * stopwatch_accumulator is a model Stopwatch allowing to accumulate several time samples and give the average, ... * Scoped helper classes allowing to pairwise start/stop operations, suspend/resume and resume/suspend a Stopwatch. * Stopwatch Formatter concept * stopwatch formatter "%ds\n" * stopwatch accumulator formatter "%c times, sum%ss, min%ms, max%Ms, mean%as\n" * time formatter "real %rs, cpu %cs (%p%), user %us, system %ss\n" * digital_time decomposition class separating days, hours,minutes,seconds, nanoseconds from any duration class (looking for a better name) * digital_time formatter "%d days(s) %h:%m:%s.%n\n" * stopwatch_reporter is a convenient generic class reporting elapsed time for the Stopwatch concept. * stopclock<Clock> shortcut stopwatch_reporter<stopwatch<Clcok>> * typeof registration for classes duration and time_point
Depreceated Features: * The classes process_times, process_clock, process_timer, timer and run_timer are now deprecated as the preceding additions are more generic. However for backward compatibility they are preserved until inclusion of the library in Boost. Next follows the equivalences: timer<> ~ stopwatch<> process_timer ~ stopwatch<process_cpu_clock> run_timer ~ stopclock<>
Bug Fixes * Try to correct warning C4251: 'boost::chrono::run_timer::m_format' : class 'std::basic_string<_Elem,_Traits,_Ax>' needs to have dll-interface to be used by clients of class 'boost::chrono::run_timer', by don't including inlines functions using the std::string m_format.
For people that doesn't know it yet, Boost.Chrono library provides: * The C++0x Standard Library's common_type. * The C++0x Standard Library's compile-time rational arithmetic. * The C++0x Standard Library's time utilities, including: * Class template duration * Class template time_point * Clocks: * system_clock * monotonic_clock * high_resolution_clock * typeof registration for classes duration and time_point * Process clocks: * 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_cpu_clock, tuple-like class capturing at once real, user-CPU, and system-CPU times. * Stopwatches: * stopwatch, capturing elapsed Clock times. * stopwatch_accumulator, capturing cummulated elapsed Clock times. * scoped helper classes allowing to pairwise start/stop operations, suspend/resume and resume/suspend a Stopwatch. * Stopclocks or Stopwatch reporters: * stopwatch_reporter, convenient reporting of models of Stopwatch results. * stopclock<Clock> shortcut of stopwatch_reporter<stopwatch<Clock>>
Best regards, _____________________ Vicente Juan Botet Escribá
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

Klaim wrote:
To be clear, it's the output that's missing.
Thanks to pointing this out. The output should be something like 0.009s 0.021s 0.029s Best,Vicente -- View this message in context: http://old.nabble.com/-chrono--v0.3--New-Stopwatch-Feature-tp27202338p272118... Sent from the Boost - Dev mailing list archive at Nabble.com.

Hi Vicente, qq. In your documentation you say that one should include: #include <boost/chrono.hpp> but shouldn't it be #include <boost/chrono/chrono.hpp> See at the botton of: http://svn.boost.org/svn/boost/sandbox/chrono/libs/chrono/doc/html/boost_chr... Thanks, Christian On Mon, Jan 18, 2010 at 10:10 AM, Vicente Botet Escriba <vicente.botet@wanadoo.fr> wrote:
Klaim wrote:
To be clear, it's the output that's missing.
Thanks to pointing this out. The output should be something like
0.009s 0.021s 0.029s
Best,Vicente
-- View this message in context: http://old.nabble.com/-chrono--v0.3--New-Stopwatch-Feature-tp27202338p272118... Sent from the Boost - Dev mailing list archive at Nabble.com.
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Vicente, sorry to bother you. But how do you exactly built chrono. I'm noooo expert for boost.build. A short step by step explanation could save me and others hours. Thanks, Christian On Mon, Jan 18, 2010 at 10:31 AM, Christian Henning <chhenning@gmail.com> wrote:
Hi Vicente, qq. In your documentation you say that one should include:
#include <boost/chrono.hpp>
but shouldn't it be
#include <boost/chrono/chrono.hpp>
See at the botton of:
http://svn.boost.org/svn/boost/sandbox/chrono/libs/chrono/doc/html/boost_chr...
Thanks, Christian
On Mon, Jan 18, 2010 at 10:10 AM, Vicente Botet Escriba <vicente.botet@wanadoo.fr> wrote:
Klaim wrote:
To be clear, it's the output that's missing.
Thanks to pointing this out. The output should be something like
0.009s 0.021s 0.029s
Best,Vicente
-- View this message in context: http://old.nabble.com/-chrono--v0.3--New-Stopwatch-Feature-tp27202338p272118... Sent from the Boost - Dev mailing list archive at Nabble.com.
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Christian Henning wrote:
Vicente, sorry to bother you. But how do you exactly built chrono. I'm noooo expert for boost.build. A short step by step explanation could save me and others hours.
Thanks, Christian
You can see the description in http://svn.boost.org/svn/boost/sandbox/chrono/libs/chrono/doc/html/boost_chr... and http://svn.boost.org/svn/boost/sandbox/chrono/libs/chrono/doc/html/boost_chr.... Here is the extraction: Where to install Boost.Chrono? *** The simple way is to decompress (or checkout from SVN) the file in your BOOST_ROOT directory. *** Otherwise, if you decompress in a different directory, you will need to comment some lines, and uncomment and change others in the build/Jamfile and test/Jamfile. Sorry for this, but I have not reached yet to write a Jamfile that is able to work in both environments and use the BOOST_ROOT variable. Any help is welcome. Building Boost.Chrono Boost.Chrono is not a header only library. You need to compile it before use. bjam libs/chrono/build Building an executable that uses Boost.Chrono In addition to link with the Boost Chrono library you need also to link with the Boost System library. In order to test you need to do bjam libs/chrono/test You can also run a specific suite of test by doing cd libs/chrono/test bjam common_type bjam libs/chrono/build Let me know if there is something is missing, and please add the command you have used and the results when not working. Thanks to trying to use it, Vicente -- View this message in context: http://old.nabble.com/-chrono--v0.3--New-Stopwatch-Feature-tp27202338p272127... Sent from the Boost - Dev mailing list archive at Nabble.com.

Hi Vicente, thanks for your reply. I have successfully run compilation and tests with VS2005. You might wanna add that compiler to your doc. Thanks for your great work, Christian On Mon, Jan 18, 2010 at 11:13 AM, Vicente Botet Escriba <vicente.botet@wanadoo.fr> wrote:
Christian Henning wrote:
Vicente, sorry to bother you. But how do you exactly built chrono. I'm noooo expert for boost.build. A short step by step explanation could save me and others hours.
Thanks, Christian
You can see the description in http://svn.boost.org/svn/boost/sandbox/chrono/libs/chrono/doc/html/boost_chr... and http://svn.boost.org/svn/boost/sandbox/chrono/libs/chrono/doc/html/boost_chr....
Here is the extraction:
Where to install Boost.Chrono?
*** The simple way is to decompress (or checkout from SVN) the file in your BOOST_ROOT directory. ***
Otherwise, if you decompress in a different directory, you will need to comment some lines, and uncomment and change others in the build/Jamfile and test/Jamfile. Sorry for this, but I have not reached yet to write a Jamfile that is able to work in both environments and use the BOOST_ROOT variable. Any help is welcome. Building Boost.Chrono
Boost.Chrono is not a header only library. You need to compile it before use.
bjam libs/chrono/build
Building an executable that uses Boost.Chrono
In addition to link with the Boost Chrono library you need also to link with the Boost System library.
In order to test you need to do
bjam libs/chrono/test
You can also run a specific suite of test by doing
cd libs/chrono/test bjam common_type
bjam libs/chrono/build
Let me know if there is something is missing, and please add the command you have used and the results when not working.
Thanks to trying to use it, Vicente -- View this message in context: http://old.nabble.com/-chrono--v0.3--New-Stopwatch-Feature-tp27202338p272127... Sent from the Boost - Dev mailing list archive at Nabble.com.
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Christian Henning wrote:
Hi Vicente, qq. In your documentation you say that one should include:
#include <boost/chrono.hpp>
but shouldn't it be
#include <boost/chrono/chrono.hpp>
See at the botton of:
http://svn.boost.org/svn/boost/sandbox/chrono/libs/chrono/doc/html/boost_chr...
Thanks, Christian
On Mon, Jan 18, 2010 at 10:10 AM, Vicente Botet Escriba <vicente.botet@wanadoo.fr> wrote:
Klaim wrote:
To be clear, it's the output that's missing.
Thanks to pointing this out. The output should be something like
0.009s 0.021s 0.029s
Best,Vicente
-- View this message in context: http://old.nabble.com/-chrono--v0.3--New-Stopwatch-Feature-tp27202338p272118... Sent from the Boost - Dev mailing list archive at Nabble.com.
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Right. I should #include <boost/chrono/chrono.hpp> I will change it. Vicente -- View this message in context: http://old.nabble.com/-chrono--v0.3--New-Stopwatch-Feature-tp27202338p272126... Sent from the Boost - Dev mailing list archive at Nabble.com.
participants (4)
-
Christian Henning
-
Klaim
-
Vicente Botet Escriba
-
vicente.botet