$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r66119 - in sandbox/chrono/boost/chrono: . detail detail/inlined detail/inlined/mac detail/inlined/posix detail/inlined/win
From: vicente.botet_at_[hidden]
Date: 2010-10-20 13:00:51
Author: viboes
Date: 2010-10-20 13:00:47 EDT (Wed, 20 Oct 2010)
New Revision: 66119
URL: http://svn.boost.org/trac/boost/changeset/66119
Log:
Chrono: 
* Use BOOST_CHRONO_SYSTEM_CATEGORY to simplify code
* try to don't make lines lounger than 80 chars
* Adapt to build with BOOST_SYSTEL_NO_DEPRECATED
* Add checks on ec when it is equal to throws()
Text files modified: 
   sandbox/chrono/boost/chrono/detail/inlined/chrono.hpp              |     1                                         
   sandbox/chrono/boost/chrono/detail/inlined/mac/chrono.hpp          |    74 +++-                                    
   sandbox/chrono/boost/chrono/detail/inlined/mac/process_clock.hpp   |    47 ++-                                     
   sandbox/chrono/boost/chrono/detail/inlined/posix/chrono.hpp        |    56 +++                                     
   sandbox/chrono/boost/chrono/detail/inlined/posix/process_clock.hpp |    40 +                                       
   sandbox/chrono/boost/chrono/detail/inlined/posix/thread_clock.hpp  |    39 +                                       
   sandbox/chrono/boost/chrono/detail/inlined/process_clock.hpp       |     6                                         
   sandbox/chrono/boost/chrono/detail/inlined/process_cpu_clocks.hpp  |    17                                         
   sandbox/chrono/boost/chrono/detail/inlined/run_timer.hpp           |    28 +                                       
   sandbox/chrono/boost/chrono/detail/inlined/thread_clock.hpp        |     3                                         
   sandbox/chrono/boost/chrono/detail/inlined/win/chrono.hpp          |    54 ++-                                     
   sandbox/chrono/boost/chrono/detail/inlined/win/process_clock.hpp   |    62 ++-                                     
   sandbox/chrono/boost/chrono/detail/inlined/win/thread_clock.hpp    |   109 ++++---                                 
   sandbox/chrono/boost/chrono/detail/system.hpp                      |     7                                         
   sandbox/chrono/boost/chrono/duration.hpp                           |   567 ++++++++++++++++++++------------------- 
   sandbox/chrono/boost/chrono/process_cpu_clocks.hpp                 |    79 ++++-                                   
   sandbox/chrono/boost/chrono/process_times.hpp                      |    42 +-                                      
   sandbox/chrono/boost/chrono/time_point.hpp                         |   406 +++++++++++++++------------             
   sandbox/chrono/boost/chrono/timer.hpp                              |    14                                         
   19 files changed, 943 insertions(+), 708 deletions(-)
Modified: sandbox/chrono/boost/chrono/detail/inlined/chrono.hpp
==============================================================================
--- sandbox/chrono/boost/chrono/detail/inlined/chrono.hpp	(original)
+++ sandbox/chrono/boost/chrono/detail/inlined/chrono.hpp	2010-10-20 13:00:47 EDT (Wed, 20 Oct 2010)
@@ -13,6 +13,7 @@
 #include <boost/chrono/chrono.hpp>
 #include <boost/system/system_error.hpp>
 #include <boost/throw_exception.hpp>
+#include <boost/chrono/detail/system.hpp>
 
 //----------------------------------------------------------------------------//
 //                                                                            //
Modified: sandbox/chrono/boost/chrono/detail/inlined/mac/chrono.hpp
==============================================================================
--- sandbox/chrono/boost/chrono/detail/inlined/mac/chrono.hpp	(original)
+++ sandbox/chrono/boost/chrono/detail/inlined/mac/chrono.hpp	2010-10-20 13:00:47 EDT (Wed, 20 Oct 2010)
@@ -38,7 +38,10 @@
 {
     timeval tv;
     gettimeofday(&tv, 0);
-    ec.clear();
+    if (!BOOST_CHRONO_IS_THROWS(ec)) 
+    {
+        ec.clear();
+    }
     return time_point(seconds(tv.tv_sec) + microseconds(tv.tv_usec));
 }
 
@@ -83,7 +86,9 @@
 monotonic_clock::rep
 monotonic_simplified_ec(system::error_code & ec)
 {
-    ec.clear();
+    if (!BOOST_CHRONO_IS_THROWS(ec))
+        ec.clear();
+    }
     return mach_absolute_time();
 }
 
@@ -108,11 +113,7 @@
     static const double factor = chrono_detail::compute_monotonic_factor(err);
     if (err != 0)
       boost::throw_exception(
-#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
-        system::system_error( err, system::system_category, "chrono::monotonic_clock" ));
-#else
-        system::system_error( err, system::system_category(), "chrono::monotonic_clock" ));
-#endif
+        system::system_error( err, BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::monotonic_clock" ));
     return static_cast<monotonic_clock::rep>(mach_absolute_time() * factor);
 }
 
@@ -123,14 +124,23 @@
     static kern_return_t err;
     static const double factor = chrono_detail::compute_monotonic_factor(err);
     if (err != 0) {
-#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
-      ec.assign( errno, system::system_category );
-#else
-      ec.assign( errno, system::system_category() );
-#endif
-      return monotonic_clock::rep();
+        if (BOOST_CHRONO_IS_THROWS(ec))
+        {
+            boost::throw_exception(
+                    system::system_error( 
+                            err, 
+                            BOOST_CHRONO_SYSTEM_CATEGORY, 
+                            "chrono::monotonic_clock" ));
+        } 
+        else
+        {
+            ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
+            return monotonic_clock::rep();
+        }
+    }
+    if (!BOOST_CHRONO_IS_THROWS(ec))
+        ec.clear();
     }
-    ec.clear();
     return static_cast<monotonic_clock::rep>(mach_absolute_time() * factor);
 }
 
@@ -173,12 +183,13 @@
 {
     static kern_return_t err;
     static chrono_detail::FP_ec fp = chrono_detail::init_monotonic_clock(err);
-    if( err != 0  ) 	boost::throw_exception(
-#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
-        system::system_error( err, system::system_category, "chrono::monotonic_clock" ));
-#else
-        system::system_error( err, system::system_category(), "chrono::monotonic_clock" ));
-#endif
+    if( err != 0  ) { 	
+        boost::throw_exception(
+                system::system_error( 
+                        err, 
+                        BOOST_CHRONO_SYSTEM_CATEGORY, 
+                        "chrono::monotonic_clock" ));
+    }
     return time_point(duration(fp()));
 }
 
@@ -188,14 +199,23 @@
     static kern_return_t err;
     static chrono_detail::FP_ec fp = chrono_detail::init_monotonic_clock(err);
     if( err != 0  ) {
-#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
-        ec.assign( err, system::system_category );
-#else
-        ec.assign( err, system::system_category() );
-#endif
-        return time_point();
+        if (BOOST_CHRONO_IS_THROWS(ec))
+        {
+            boost::throw_exception(
+                    system::system_error( 
+                            err, 
+                            BOOST_CHRONO_SYSTEM_CATEGORY, 
+                            "chrono::monotonic_clock" ));
+        }
+        else
+        {
+            ec.assign( err, BOOST_CHRONO_SYSTEM_CATEGORY );
+            return time_point();
+        }
+    }
+    if (!BOOST_CHRONO_IS_THROWS(ec))
+        ec.clear();
     }
-    ec.clear();
     return time_point(duration(fp(ec)));
 }
 
Modified: sandbox/chrono/boost/chrono/detail/inlined/mac/process_clock.hpp
==============================================================================
--- sandbox/chrono/boost/chrono/detail/inlined/mac/process_clock.hpp	(original)
+++ sandbox/chrono/boost/chrono/detail/inlined/mac/process_clock.hpp	2010-10-20 13:00:47 EDT (Wed, 20 Oct 2010)
@@ -54,14 +54,19 @@
       clock_t c = ::times( &tm );
       if ( c == -1 ) // error
       {
-        assert( 0 && "error handling not implemented yet" );
-
-#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
-          ec.assign( errno, system::system_category );
-#else
-          ec.assign( errno, system::system_category() );
-#endif
-        times_.real = times_.system = times_.user = nanoseconds(-1);
+          if (BOOST_CHRONO_IS_THROWS(ec))
+          {
+              boost::throw_exception(
+                      system::system_error( 
+                              errno, 
+                              BOOST_CHRONO_SYSTEM_CATEGORY, 
+                              "chrono::process_clock" ));
+          } 
+          else
+          {
+              ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
+              times_.real = times_.system = times_.user = nanoseconds(-1);
+          }
       }
       else
       {
@@ -73,18 +78,26 @@
           times_.real *= chrono_detail::tick_factor();
           times_.user *= chrono_detail::tick_factor();
           times_.system *= chrono_detail::tick_factor();
-          ec.clear();
+          if (!BOOST_CHRONO_IS_THROWS(ec)) 
+          {
+            ec.clear();
+          }
         }
         else
         {
-          assert( 0 && "error handling not implemented yet" );
-#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
-          ec.assign( errno, system::system_category );
-#else
-          ec.assign( errno, system::system_category() );
-#endif
-
-          times_.real = times_.user = times_.system = nanoseconds(-1);
+            if (BOOST_CHRONO_IS_THROWS(ec))
+            {
+                boost::throw_exception(
+                        system::system_error( 
+                                errno, 
+                                BOOST_CHRONO_SYSTEM_CATEGORY, 
+                                "chrono::process_clock" ));
+            } 
+            else
+            {
+                ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
+                times_.real = times_.user = times_.system = nanoseconds(-1);
+            }
         }
       }
 
Modified: sandbox/chrono/boost/chrono/detail/inlined/posix/chrono.hpp
==============================================================================
--- sandbox/chrono/boost/chrono/detail/inlined/posix/chrono.hpp	(original)
+++ sandbox/chrono/boost/chrono/detail/inlined/posix/chrono.hpp	2010-10-20 13:00:47 EDT (Wed, 20 Oct 2010)
@@ -22,8 +22,11 @@
     timespec ts;
     if ( ::clock_gettime( CLOCK_REALTIME, &ts ) )
     {
-      boost::throw_exception(
-        system::system_error( errno, BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::system_clock" ));
+        boost::throw_exception(
+                system::system_error( 
+                        errno, 
+                        BOOST_CHRONO_SYSTEM_CATEGORY, 
+                        "chrono::system_clock" ));
     }
 
     return time_point(duration(
@@ -35,13 +38,27 @@
     timespec ts;
     if ( ::clock_gettime( CLOCK_REALTIME, &ts ) )
     {
-      ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
-      return time_point();
+        if (BOOST_CHRONO_IS_THROWS(ec))
+        {
+            boost::throw_exception(
+                    system::system_error( 
+                            errno, 
+                            BOOST_CHRONO_SYSTEM_CATEGORY, 
+                            "chrono::system_clock" ));
+        }
+        else
+        {
+            ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
+            return time_point();
+        }
     }
 
-    ec.clear();
+    if (!BOOST_CHRONO_IS_THROWS(ec)) 
+    {
+        ec.clear();
+    }
     return time_point(duration(
-      static_cast<system_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
+//      static_cast<system_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
   }
 
   std::time_t system_clock::to_time_t(const system_clock::time_point& t)
@@ -61,8 +78,11 @@
     timespec ts;
     if ( ::clock_gettime( CLOCK_MONOTONIC, &ts ) )
     {
-      boost::throw_exception(
-        system::system_error( errno, BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::monotonic_clock" ));
+        boost::throw_exception(
+                system::system_error( 
+                        errno, 
+                        BOOST_CHRONO_SYSTEM_CATEGORY, 
+                        "chrono::monotonic_clock" ));
     }
 
     return time_point(duration(
@@ -74,11 +94,25 @@
     timespec ts;
     if ( ::clock_gettime( CLOCK_MONOTONIC, &ts ) )
     {
-      ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
-      return time_point();
+        if (BOOST_CHRONO_IS_THROWS(ec))
+        {
+            boost::throw_exception(
+                    system::system_error( 
+                            errno, 
+                            BOOST_CHRONO_SYSTEM_CATEGORY, 
+                            "chrono::monotonic_clock" ));
+        }
+        else
+        {
+            ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
+            return time_point();
+        }
     }
 
-    ec.clear();
+    if (!BOOST_CHRONO_IS_THROWS(ec)) 
+    {
+        ec.clear();
+    }
     return time_point(duration(
       static_cast<monotonic_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
   }
Modified: sandbox/chrono/boost/chrono/detail/inlined/posix/process_clock.hpp
==============================================================================
--- sandbox/chrono/boost/chrono/detail/inlined/posix/process_clock.hpp	(original)
+++ sandbox/chrono/boost/chrono/detail/inlined/posix/process_clock.hpp	2010-10-20 13:00:47 EDT (Wed, 20 Oct 2010)
@@ -46,13 +46,19 @@
         clock_t c = ::times( &tm );
         if ( c == clock_t(-1) ) // error
         {
-            assert( 0 && "error handling not implemented yet" );
-#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
-            ec.assign( errno, system::system_category );
-#else
-            ec.assign( errno, system::system_category() );
-#endif
-            times_.real = times_.system = times_.user = nanoseconds(-1);
+            if (BOOST_CHRONO_IS_THROWS(ec))
+            {
+                boost::throw_exception(
+                        system::system_error( 
+                                errno, 
+                                BOOST_CHRONO_SYSTEM_CATEGORY, 
+                                "chrono::process_clock" ));
+            }
+            else
+            {
+                ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
+                times_.real = times_.system = times_.user = nanoseconds(-1);
+            }
         }
         else
         {
@@ -67,13 +73,19 @@
             }
             else
             {
-                assert( 0 && "error handling not implemented yet" );
-#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
-                ec.assign( errno, system::system_category );
-#else
-                ec.assign( errno, system::system_category() );
-#endif
-                times_.real = times_.user = times_.system = nanoseconds(-1);
+                if (BOOST_CHRONO_IS_THROWS(ec))
+                {
+                    boost::throw_exception(
+                            system::system_error( 
+                                    errno, 
+                                    BOOST_CHRONO_SYSTEM_CATEGORY, 
+                                    "chrono::process_clock" ));
+                }
+                else
+                {
+                    ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
+                    times_.real = times_.user = times_.system = nanoseconds(-1);
+                }
             }
         }
 
Modified: sandbox/chrono/boost/chrono/detail/inlined/posix/thread_clock.hpp
==============================================================================
--- sandbox/chrono/boost/chrono/detail/inlined/posix/thread_clock.hpp	(original)
+++ sandbox/chrono/boost/chrono/detail/inlined/posix/thread_clock.hpp	2010-10-20 13:00:47 EDT (Wed, 20 Oct 2010)
@@ -19,7 +19,8 @@
 
 namespace boost { namespace chrono {
 
-	thread_clock::time_point thread_clock::now( ) {
+	thread_clock::time_point thread_clock::now( ) 
+	{
         // get the current thread
         pthread_t pth=pthread_self();
         // get the clock_id associated to the current thread
@@ -30,11 +31,10 @@
         if ( ::clock_gettime( clock_id, &ts ) )
         {
             boost::throw_exception(
-#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
-            system::system_error( errno, system::system_category, "chrono::thread_clock" ));
-#else
-            system::system_error( errno, system::system_category(), "chrono::thread_clock" ));
-#endif
+                    system::system_error( 
+                            errno, 
+                            BOOST_CHRONO_SYSTEM_CATEGORY, 
+                            "chrono::thread_clock" ));
         }
 
         // transform to nanoseconds
@@ -42,7 +42,8 @@
             static_cast<thread_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
 
     }
-	thread_clock::time_point thread_clock::now( system::error_code & ec ) {
+	thread_clock::time_point thread_clock::now( system::error_code & ec ) 
+	{
         // get the current thread
         pthread_t pth=pthread_self();
         // get the clock_id associated to the current thread
@@ -52,14 +53,24 @@
         struct timespec ts;
         if ( ::clock_gettime( clock_id, &ts ) )
         {
-#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
-          ec.assign( errno, system::system_category );
-#else
-          ec.assign( errno, system::system_category() );
-#endif
-          return time_point();
+            if (BOOST_CHRONO_IS_THROWS(ec))
+            {
+                boost::throw_exception(
+                        system::system_error( 
+                                errno, 
+                                BOOST_CHRONO_SYSTEM_CATEGORY, 
+                                "chrono::thread_clock" ));
+            }
+            else
+            {
+                ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
+                return time_point();
+            }
+        }
+        if (!BOOST_CHRONO_IS_THROWS(ec)) 
+        {
+            ec.clear();
         }
-        ec.clear();
         // transform to nanoseconds
         return time_point(duration(
             static_cast<thread_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
Modified: sandbox/chrono/boost/chrono/detail/inlined/process_clock.hpp
==============================================================================
--- sandbox/chrono/boost/chrono/detail/inlined/process_clock.hpp	(original)
+++ sandbox/chrono/boost/chrono/detail/inlined/process_clock.hpp	2010-10-20 13:00:47 EDT (Wed, 20 Oct 2010)
@@ -16,7 +16,8 @@
 #include <boost/chrono/config.hpp>
 #include <boost/version.hpp>
 #include <boost/chrono/process_times.hpp>
-#include <cassert>
+#include <boost/system/system_error.hpp>
+#include <boost/throw_exception.hpp>
 
 //----------------------------------------------------------------------------//
 //                                Windows                                     //
@@ -39,7 +40,8 @@
 #endif  // POSIX
 namespace boost { namespace chrono {
 
-    void process_clock::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/boost/chrono/detail/inlined/process_cpu_clocks.hpp
==============================================================================
--- sandbox/chrono/boost/chrono/detail/inlined/process_cpu_clocks.hpp	(original)
+++ sandbox/chrono/boost/chrono/detail/inlined/process_cpu_clocks.hpp	2010-10-20 13:00:47 EDT (Wed, 20 Oct 2010)
@@ -16,29 +16,36 @@
 #include <boost/version.hpp>
 #include <boost/chrono/process_cpu_clocks.hpp>
 #include <boost/chrono/process_times.hpp>
-#include <cassert>
 
 namespace boost { namespace chrono {
 
-    process_real_cpu_clock::time_point process_real_cpu_clock::now(system::error_code & ec) {
+    process_real_cpu_clock::time_point process_real_cpu_clock::now(
+            system::error_code & ec) 
+    {
         process_times t;
         process_clock::now(t, ec);
         return process_real_cpu_clock::time_point(t.real);
     }
 
-    process_user_cpu_clock::time_point process_user_cpu_clock::now(system::error_code & ec){
+    process_user_cpu_clock::time_point process_user_cpu_clock::now(
+            system::error_code & ec)
+    {
         process_times t;
         process_clock::now(t, ec);
         return process_user_cpu_clock::time_point(t.user);
     }
 
-    process_system_cpu_clock::time_point process_system_cpu_clock::now(system::error_code & ec) {
+    process_system_cpu_clock::time_point process_system_cpu_clock::now(
+            system::error_code & ec) 
+    {
         process_times t;
         process_clock::now(t, ec);
         return process_system_cpu_clock::time_point(t.system);
     }
 
-    process_cpu_clock::time_point process_cpu_clock::now( system::error_code & ec ) {
+    process_cpu_clock::time_point process_cpu_clock::now( 
+            system::error_code & ec ) 
+    {
         process_times t;
         process_clock::now(t,ec);
         time_point::rep r(t.real.count(), t.user.count(), t.system.count());
Modified: sandbox/chrono/boost/chrono/detail/inlined/run_timer.hpp
==============================================================================
--- sandbox/chrono/boost/chrono/detail/inlined/run_timer.hpp	(original)
+++ sandbox/chrono/boost/chrono/detail/inlined/run_timer.hpp	2010-10-20 13:00:47 EDT (Wed, 20 Oct 2010)
@@ -15,6 +15,7 @@
 #include <boost/version.hpp>
 #include <boost/chrono/process_times.hpp>
 #include <boost/system/system_error.hpp>
+#include <boost/throw_exception.hpp>
 #include <boost/io/ios_state.hpp>
 #include <cstring>
 #include <cassert>
@@ -138,7 +139,7 @@
       elapsed( times, ec );
       if (ec) return;
 
-      if ( &ec == &system::throws )
+      if ( BOOST_CHRONO_IS_THROWS(ec) )
       {
         chrono_detail::show_time( times, m_format.c_str(), m_places, m_os );
       }
@@ -147,19 +148,28 @@
         try
         {
           chrono_detail::show_time( times, m_format.c_str(), m_places, m_os );
-          ec.clear();
+          if (!BOOST_CHRONO_IS_THROWS(ec)) 
+          {
+            ec.clear();
+          }
         }
 
         catch (...) // eat any exceptions
         {
           assert( 0 && "error reporting not fully implemented yet" );
-#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
-          ec.assign(system::errc::success, system::generic_category);
-#else
-          ec.assign(system::errc::success, system::generic_category());
-#endif
-            //ec = error_code( EIO, errno_ecat );
-        }
+          if (BOOST_CHRONO_IS_THROWS(ec))
+          {
+              boost::throw_exception(
+                      system::system_error( 
+                              errno, 
+                              BOOST_CHRONO_SYSTEM_CATEGORY, 
+                              "chrono::run_timer" ));
+          } 
+          else
+          {
+            ec.assign(system::errc::success, BOOST_CHRONO_SYSTEM_CATEGORY);
+          }
+          }
       }
     }
 
Modified: sandbox/chrono/boost/chrono/detail/inlined/thread_clock.hpp
==============================================================================
--- sandbox/chrono/boost/chrono/detail/inlined/thread_clock.hpp	(original)
+++ sandbox/chrono/boost/chrono/detail/inlined/thread_clock.hpp	2010-10-20 13:00:47 EDT (Wed, 20 Oct 2010)
@@ -17,7 +17,8 @@
 #include <boost/chrono/thread_clock.hpp>
 #include <boost/throw_exception.hpp>
 #include <boost/system/system_error.hpp>
-#include <cassert>
+#include <boost/throw_exception.hpp>
+#include <boost/chrono/detail/system.hpp>
 
 //----------------------------------------------------------------------------//
 //                                Windows                                     //
Modified: sandbox/chrono/boost/chrono/detail/inlined/win/chrono.hpp
==============================================================================
--- sandbox/chrono/boost/chrono/detail/inlined/win/chrono.hpp	(original)
+++ sandbox/chrono/boost/chrono/detail/inlined/win/chrono.hpp	2010-10-20 13:00:47 EDT (Wed, 20 Oct 2010)
@@ -38,22 +38,22 @@
     static double nanosecs_per_tic = chrono_detail::get_nanosecs_per_tic();
 
     boost::detail::win32::LARGE_INTEGER_ pcount;
-    if ( (nanosecs_per_tic <= 0.0L) || (!boost::detail::win32::QueryPerformanceCounter( &pcount )) )
+    if ( (nanosecs_per_tic <= 0.0L) || 
+            (!boost::detail::win32::QueryPerformanceCounter( &pcount )) )
     {
         boost::detail::win32::DWORD_ cause =
             (nanosecs_per_tic <= 0.0L
                     ? ERROR_NOT_SUPPORTED
                     : boost::detail::win32::GetLastError());
-      boost::throw_exception(
-#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
-        system::system_error( cause, system::system_category, "chrono::monotonic_clock" ));
-#else
-        system::system_error( cause, system::system_category(), "chrono::monotonic_clock" ));
-#endif
+        boost::throw_exception(
+                system::system_error( 
+                        cause, 
+                        BOOST_CHRONO_SYSTEM_CATEGORY, 
+                        "chrono::monotonic_clock" ));
     }
 
     return monotonic_clock::time_point(monotonic_clock::duration(
-      static_cast<monotonic_clock::rep>((nanosecs_per_tic) * pcount.QuadPart) ));
+      static_cast<monotonic_clock::rep>((nanosecs_per_tic) * pcount.QuadPart)));
   }
 
 
@@ -62,20 +62,33 @@
     static double nanosecs_per_tic = chrono_detail::get_nanosecs_per_tic();
 
     boost::detail::win32::LARGE_INTEGER_ pcount;
-    if ( (nanosecs_per_tic <= 0.0L) || (!boost::detail::win32::QueryPerformanceCounter( &pcount )) )
+    if ( (nanosecs_per_tic <= 0.0L) 
+            || (!boost::detail::win32::QueryPerformanceCounter( &pcount )) )
     {
-        boost::detail::win32::DWORD_ cause = ((nanosecs_per_tic <= 0.0L) ? ERROR_NOT_SUPPORTED : boost::detail::win32::GetLastError());
-#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
-      ec.assign( cause, system::system_category );
-#else
-      ec.assign( cause, system::system_category() );
-#endif
-      return monotonic_clock::time_point(duration(0));
+        boost::detail::win32::DWORD_ cause = 
+            ((nanosecs_per_tic <= 0.0L) 
+                    ? ERROR_NOT_SUPPORTED 
+                    : boost::detail::win32::GetLastError());
+        if (BOOST_CHRONO_IS_THROWS(ec)) {
+            boost::throw_exception(
+                    system::system_error( 
+                            cause, 
+                            BOOST_CHRONO_SYSTEM_CATEGORY, 
+                            "chrono::monotonic_clock" ));
+        } 
+        else 
+        {
+            ec.assign( cause, BOOST_CHRONO_SYSTEM_CATEGORY );
+            return monotonic_clock::time_point(duration(0));
+        }
     }
 
-    ec.clear();
+    if (!BOOST_CHRONO_IS_THROWS(ec)) 
+    {
+        ec.clear();
+    }
     return time_point(duration(
-      static_cast<monotonic_clock::rep>(nanosecs_per_tic * pcount.QuadPart) ));
+      static_cast<monotonic_clock::rep>(nanosecs_per_tic * pcount.QuadPart)));
   }
 
   BOOST_CHRONO_INLINE
@@ -92,7 +105,10 @@
   {
     boost::detail::win32::FILETIME_ ft;
     boost::detail::win32::GetSystemTimeAsFileTime( &ft );  // never fails
-    ec.clear();
+    if (!BOOST_CHRONO_IS_THROWS(ec)) 
+    {
+        ec.clear();
+    }
     return time_point(duration(
       (static_cast<__int64>( ft.dwHighDateTime ) << 32) | ft.dwLowDateTime));
   }
Modified: sandbox/chrono/boost/chrono/detail/inlined/win/process_clock.hpp
==============================================================================
--- sandbox/chrono/boost/chrono/detail/inlined/win/process_clock.hpp	(original)
+++ sandbox/chrono/boost/chrono/detail/inlined/win/process_clock.hpp	2010-10-20 13:00:47 EDT (Wed, 20 Oct 2010)
@@ -23,22 +23,25 @@
 
 namespace boost
 {
-  namespace chrono
-  {
-
-    void process_clock::now( process_times & times_, system::error_code & ec )
-    {
+namespace chrono
+{
 
-      //  note that Windows uses 100 nanosecond ticks for FILETIME
-      boost::detail::win32::FILETIME_ creation, exit, user_time, system_time;
+void process_clock::now( process_times & times_, system::error_code & ec )
+{
 
-      times_.real = duration( monotonic_clock::now().time_since_epoch().count() );
+    //  note that Windows uses 100 nanosecond ticks for FILETIME
+    boost::detail::win32::FILETIME_ creation, exit, user_time, system_time;
 
-      if ( boost::detail::win32::GetProcessTimes(
-              boost::detail::win32::GetCurrentProcess(), &creation, &exit,
-             &system_time, &user_time ) )
-      {
-        ec.clear();
+    times_.real = duration( monotonic_clock::now().time_since_epoch().count() );
+       
+    if ( boost::detail::win32::GetProcessTimes(
+            boost::detail::win32::GetCurrentProcess(), &creation, &exit,
+            &system_time, &user_time ) )
+    {
+        if (!BOOST_CHRONO_IS_THROWS(ec)) 
+        {
+            ec.clear();
+        }
         times_.user   = duration(
           ((static_cast<time_point::rep>(user_time.dwHighDateTime) << 32)
             | user_time.dwLowDateTime) * 100 );
@@ -46,20 +49,27 @@
         times_.system = duration(
           ((static_cast<time_point::rep>(system_time.dwHighDateTime) << 32)
             | system_time.dwLowDateTime) * 100 );
-      }
-      else
-      {
-        //~ assert( 0 && "error handling not implemented yet" );
-#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
-        ec.assign( boost::detail::win32::GetLastError(), system::system_category );
-#else
-        ec.assign( boost::detail::win32::GetLastError(), system::system_category() );
-#endif
-        times_.real = times_.system = times_.user = nanoseconds(-1);
-      }
-
     }
-  } // namespace chrono
+    else
+    {
+        boost::detail::win32::DWORD_ cause = boost::detail::win32::GetLastError();
+        if (BOOST_CHRONO_IS_THROWS(ec)) 
+        {
+            boost::throw_exception(
+                    system::system_error( 
+                            cause, 
+                            BOOST_CHRONO_SYSTEM_CATEGORY, 
+                            "chrono::process_clock" ));
+        } 
+        else 
+        {
+            ec.assign( cause, BOOST_CHRONO_SYSTEM_CATEGORY );
+            times_.real = times_.system = times_.user = nanoseconds(-1);
+        }
+    }
+
+}
+} // namespace chrono
 } // namespace boost
 
 #endif
Modified: sandbox/chrono/boost/chrono/detail/inlined/win/thread_clock.hpp
==============================================================================
--- sandbox/chrono/boost/chrono/detail/inlined/win/thread_clock.hpp	(original)
+++ sandbox/chrono/boost/chrono/detail/inlined/win/thread_clock.hpp	2010-10-20 13:00:47 EDT (Wed, 20 Oct 2010)
@@ -21,79 +21,84 @@
 
 namespace boost
 {
-  namespace chrono
-  {
-
-    thread_clock::time_point thread_clock::now( system::error_code & ec )
-    {
+namespace chrono
+{
 
-      //  note that Windows uses 100 nanosecond ticks for FILETIME
-        boost::detail::win32::FILETIME_ creation, exit, user_time, system_time;
+thread_clock::time_point thread_clock::now( system::error_code & ec )
+{
+    //  note that Windows uses 100 nanosecond ticks for FILETIME
+    boost::detail::win32::FILETIME_ creation, exit, user_time, system_time;
 
-      if ( boost::detail::win32::GetThreadTimes(
-              boost::detail::win32::GetCurrentThread (), &creation, &exit,
-             &system_time, &user_time ) )
-      {
-        duration user   = duration(
-          ((static_cast<duration::rep>(user_time.dwHighDateTime) << 32)
-            | user_time.dwLowDateTime) * 100 );
+    if ( boost::detail::win32::GetThreadTimes(
+            boost::detail::win32::GetCurrentThread (), &creation, &exit,
+            &system_time, &user_time ) )
+    {
+        duration user = duration(
+                ((static_cast<duration::rep>(user_time.dwHighDateTime) << 32)
+                        | user_time.dwLowDateTime) * 100 );
 
         duration system = duration(
-          ((static_cast<duration::rep>(system_time.dwHighDateTime) << 32)
-            | system_time.dwLowDateTime) * 100 );
+                ((static_cast<duration::rep>(system_time.dwHighDateTime) << 32)
+                        | system_time.dwLowDateTime) * 100 );
 
-        ec.clear();
+        if (!BOOST_CHRONO_IS_THROWS(ec)) 
+        {
+            ec.clear();
+        }
         return time_point(system+user);
 
-      }
-      else
-      {
-        //~ assert( 0 && "error handling not implemented yet" );
-#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
-        ec.assign( boost::detail::win32::GetLastError(), system::system_category );
-#else
-        ec.assign( boost::detail::win32::GetLastError(), system::system_category() );
-#endif
-        return thread_clock::time_point(duration(0));
-      }
-
     }
-
-    thread_clock::time_point thread_clock::now( )
+    else
     {
+        if (BOOST_CHRONO_IS_THROWS(ec)) 
+        {
+            boost::throw_exception(
+                    system::system_error( 
+                            boost::detail::win32::GetLastError(), 
+                            BOOST_CHRONO_SYSTEM_CATEGORY, 
+                            "chrono::thread_clock" ));
+        } 
+        else 
+        {
+            ec.assign( boost::detail::win32::GetLastError(), BOOST_CHRONO_SYSTEM_CATEGORY );
+            return thread_clock::time_point(duration(0));
+        }
+    }
+}
+
+thread_clock::time_point thread_clock::now( )
+{
 
-      //  note that Windows uses 100 nanosecond ticks for FILETIME
-      boost::detail::win32::FILETIME_ creation, exit, user_time, system_time;
+    //  note that Windows uses 100 nanosecond ticks for FILETIME
+    boost::detail::win32::FILETIME_ creation, exit, user_time, system_time;
 
-      if ( boost::detail::win32::GetThreadTimes( boost::detail::win32::GetCurrentThread (), &creation, &exit,
-             &system_time, &user_time ) )
-      {
+    if ( boost::detail::win32::GetThreadTimes( 
+            boost::detail::win32::GetCurrentThread (), &creation, &exit,
+            &system_time, &user_time ) )
+    {
         duration user   = duration(
-          ((static_cast<duration::rep>(user_time.dwHighDateTime) << 32)
-            | user_time.dwLowDateTime) * 100 );
+                ((static_cast<duration::rep>(user_time.dwHighDateTime) << 32)
+                        | user_time.dwLowDateTime) * 100 );
 
         duration system = duration(
-          ((static_cast<duration::rep>(system_time.dwHighDateTime) << 32)
-            | system_time.dwLowDateTime) * 100 );
+                ((static_cast<duration::rep>(system_time.dwHighDateTime) << 32)
+                        | system_time.dwLowDateTime) * 100 );
 
         return time_point(system+user);
 
-      }
-      else
-      {
+    }
+    else
+    {
         boost::throw_exception(
-#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
-            system::system_error( boost::detail::win32::GetLastError(), system::system_category, "chrono::monotonic_clock" ));
-#else
-            system::system_error( boost::detail::win32::GetLastError(), system::system_category(), "chrono::monotonic_clock" ));
-#endif
-      }
-
+                system::system_error( 
+                        boost::detail::win32::GetLastError(), 
+                        BOOST_CHRONO_SYSTEM_CATEGORY, 
+                        "chrono::thread_clock" ));
     }
 
+}
 
-
-  } // namespace chrono
+} // namespace chrono
 } // namespace boost
 
 #endif
Modified: sandbox/chrono/boost/chrono/detail/system.hpp
==============================================================================
--- sandbox/chrono/boost/chrono/detail/system.hpp	(original)
+++ sandbox/chrono/boost/chrono/detail/system.hpp	2010-10-20 13:00:47 EDT (Wed, 20 Oct 2010)
@@ -15,5 +15,12 @@
 #define BOOST_CHRONO_SYSTEM_CATEGORY boost::system::system_category()
 #endif
 
+#ifdef BOOST_SYSTEM_NO_DEPRECATED 
+#define BOOST_CHRONO_THROWS boost::throws()
+#define BOOST_CHRONO_IS_THROWS(EC) (&EC==&boost::throws())
+#else
+#define BOOST_CHRONO_THROWS boost::system::throws
+#define BOOST_CHRONO_IS_THROWS(EC) (&EC==&boost::system::throws)
+#endif
 
 #endif
Modified: sandbox/chrono/boost/chrono/duration.hpp
==============================================================================
--- sandbox/chrono/boost/chrono/duration.hpp	(original)
+++ sandbox/chrono/boost/chrono/duration.hpp	2010-10-20 13:00:47 EDT (Wed, 20 Oct 2010)
@@ -70,7 +70,7 @@
 namespace boost {
 namespace chrono {
 
-  template <class Rep, class Period = ratio<1> >
+    template <class Rep, class Period = ratio<1> >
     class duration;
 
     namespace detail
@@ -177,90 +177,37 @@
     {
     };
 
-  } // namespace detail
+} // namespace detail
 } // namespace chrono
 
 
 // common_type trait specializations
 
 template <class Rep1, class Period1, class Rep2, class Period2>
-  struct common_type<chrono::duration<Rep1, Period1>,
+struct common_type<chrono::duration<Rep1, Period1>,
                      chrono::duration<Rep2, Period2> >;
 
 
 namespace chrono {
 
-  // customization traits
-  template <class Rep> struct treat_as_floating_point;
-  template <class Rep> struct duration_values;
-
-  // duration arithmetic
-//  template <class Rep1, class Period1, class Rep2, class Period2>
-//    typename common_type<duration<Rep1, Period1>, duration<Rep2, Period2> >::type
-//    operator+(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
-//  template <class Rep1, class Period1, class Rep2, class Period2>
-//    typename common_type<duration<Rep1, Period1>, duration<Rep2, Period2> >::type
-//    operator-(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
-//  template <class Rep1, class Period, class Rep2>
-//    typename boost::enable_if_c
-//    <
-//      boost::is_convertible<Rep1, typename common_type<Rep1, Rep2>::type>::value
-//        && boost::is_convertible<Rep2, typename common_type<Rep1, Rep2>::type>::value,
-//      duration<typename common_type<Rep1, Rep2>::type, Period>
-//    >::type
-//   operator*(const duration<Rep1, Period>& d, const Rep2& s);
-//  template <class Rep1, class Period, class Rep2>
-//    typename boost::enable_if_c
-//    <
-//      boost::is_convertible<Rep1, typename common_type<Rep1, Rep2>::type>::value
-//        && boost::is_convertible<Rep2, typename common_type<Rep1, Rep2>::type>::value,
-//      duration<typename common_type<Rep1, Rep2>::type, Period>
-//    >::type
-//    operator*(const Rep1& s, const duration<Rep2, Period>& d);
-
-//  template <class Rep1, class Period, class Rep2>
-//    typename boost::disable_if <detail::is_duration<Rep2>,
-//      typename detail::duration_divide_result<duration<Rep1, Period>, Rep2>::type
-//    >::type
-//    operator/(const duration<Rep1, Period>& d, const Rep2& s);
-
-//  template <class Rep1, class Period1, class Rep2, class Period2>
-//    typename common_type<Rep1, Rep2>::type
-//    operator/(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
-
-  // duration comparisons
-//  template <class Rep1, class Period1, class Rep2, class Period2>
-//    bool operator==(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
-//  template <class Rep1, class Period1, class Rep2, class Period2>
-//    bool operator!=(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
-//  template <class Rep1, class Period1, class Rep2, class Period2>
-//    bool operator< (const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
-//  template <class Rep1, class Period1, class Rep2, class Period2>
-//    bool operator<=(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
-//  template <class Rep1, class Period1, class Rep2, class Period2>
-//    bool operator> (const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
-//  template <class Rep1, class Period1, class Rep2, class Period2>
-//    bool operator>=(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs);
-
-  // duration_cast
-
-  //template <class ToDuration, class Rep, class Period>
-  //  ToDuration duration_cast(const duration<Rep, Period>& d);
-
-  // convenience typedefs
-  typedef duration<boost::int_least64_t, nano> nanoseconds;    // at least 64 bits needed
-  typedef duration<boost::int_least64_t, micro> microseconds;  // at least 55 bits needed
-  typedef duration<boost::int_least64_t, milli> milliseconds;  // at least 45 bits needed
-  typedef duration<boost::int_least64_t> seconds;              // at least 35 bits needed
-  typedef duration<boost::int_least32_t, ratio< 60> > minutes; // at least 29 bits needed
-  typedef duration<boost::int_least32_t, ratio<3600> > hours;  // at least 23 bits needed
+    // customization traits
+    template <class Rep> struct treat_as_floating_point;
+    template <class Rep> struct duration_values;
+
+    // convenience typedefs
+    typedef duration<boost::int_least64_t, nano> nanoseconds;    // at least 64 bits needed
+    typedef duration<boost::int_least64_t, micro> microseconds;  // at least 55 bits needed
+    typedef duration<boost::int_least64_t, milli> milliseconds;  // at least 45 bits needed
+    typedef duration<boost::int_least64_t> seconds;              // at least 35 bits needed
+    typedef duration<boost::int_least32_t, ratio< 60> > minutes; // at least 29 bits needed
+    typedef duration<boost::int_least32_t, ratio<3600> > hours;  // at least 23 bits needed
 
 //----------------------------------------------------------------------------//
 //                          duration helpers                                  //
 //----------------------------------------------------------------------------//
 
-  namespace detail
-  {
+namespace detail
+{
 
     // duration_cast
 
@@ -353,7 +300,7 @@
         }
     };
 
-  } // namespace detail
+} // namespace detail
 
 //----------------------------------------------------------------------------//
 //                                                                            //
@@ -365,16 +312,16 @@
 //      Probably should have been treat_as_floating_point. Editor notifed.    //
 //----------------------------------------------------------------------------//
 
-  // Support bidirectional (non-exact) conversions for floating point rep types
-  //   (or user defined rep types which specialize treat_as_floating_point).
-  template <class Rep>
+    // Support bidirectional (non-exact) conversions for floating point rep types
+    //   (or user defined rep types which specialize treat_as_floating_point).
+    template <class Rep>
     struct treat_as_floating_point : boost::is_floating_point<Rep> {};
 
 //----------------------------------------------------------------------------//
 //      20.9.2.2 duration_values [time.traits.duration_values]                //
 //----------------------------------------------------------------------------//
 
-  namespace detail {
+namespace detail {
     template <class T, bool = is_arithmetic<T>::value>
     struct chrono_numeric_limits {
         static T lowest() throw() {return (std::numeric_limits<T>::min)  ();}
@@ -387,31 +334,47 @@
 
     template <>
     struct chrono_numeric_limits<float,true> {
-        static float lowest() throw() {return -(std::numeric_limits<float>::max) ();}
+        static float lowest() throw() 
+        {
+            return -(std::numeric_limits<float>::max) ();
+        }
     };
 
     template <>
     struct chrono_numeric_limits<double,true> {
-        static double lowest() throw() {return -(std::numeric_limits<double>::max) ();}
+        static double lowest() throw() 
+        {
+            return -(std::numeric_limits<double>::max) ();
+        }
     };
 
     template <>
     struct chrono_numeric_limits<long double,true> {
-        static long double lowest() throw() {return -(std::numeric_limits<long double>::max)();}
+        static long double lowest() throw() 
+        {
+            return -(std::numeric_limits<long double>::max)();
+        }
     };
 
     template <class T>
-    struct numeric_limits : chrono_numeric_limits<typename remove_cv<T>::type> {};
+    struct numeric_limits : chrono_numeric_limits<typename remove_cv<T>::type> 
+    {};
 
-  }
-  template <class Rep>
-  struct duration_values
-  {
-      static BOOST_CHRONO_CONSTEXPR Rep zero() {return Rep(0);}
-      static BOOST_CHRONO_CONSTEXPR Rep max BOOST_PREVENT_MACRO_SUBSTITUTION ()  {return (std::numeric_limits<Rep>::max)();}
+}
+template <class Rep>
+struct duration_values
+{
+    static BOOST_CHRONO_CONSTEXPR Rep zero() {return Rep(0);}
+    static BOOST_CHRONO_CONSTEXPR Rep max BOOST_PREVENT_MACRO_SUBSTITUTION ()  
+    {
+        return (std::numeric_limits<Rep>::max)();
+    }
 
-      static BOOST_CHRONO_CONSTEXPR Rep min BOOST_PREVENT_MACRO_SUBSTITUTION ()  {return detail::numeric_limits<Rep>::lowest();}
-  };
+    static BOOST_CHRONO_CONSTEXPR Rep min BOOST_PREVENT_MACRO_SUBSTITUTION ()  
+    {
+        return detail::numeric_limits<Rep>::lowest();
+    }
+};
 
 }  // namespace chrono
 
@@ -441,9 +404,12 @@
     class duration
     {
     //BOOST_CHRONO_STATIC_ASSERT(boost::is_integral<Rep>::value, BOOST_CHRONO_A_DURATION_REPRESENTATION_MUST_BE_INTEGRAL, ());
-    BOOST_CHRONO_STATIC_ASSERT(!boost::chrono::detail::is_duration<Rep>::value, BOOST_CHRONO_A_DURATION_REPRESENTATION_CAN_NOT_BE_A_DURATION, ());
-    BOOST_CHRONO_STATIC_ASSERT(boost::ratio_detail::is_ratio<Period>::value, BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_DURATION_MUST_BE_A_STD_RATIO, ());
-    BOOST_CHRONO_STATIC_ASSERT(Period::num>0, BOOST_CHRONO_DURATION_PERIOD_MUST_BE_POSITIVE, ());
+    BOOST_CHRONO_STATIC_ASSERT(!boost::chrono::detail::is_duration<Rep>::value, 
+            BOOST_CHRONO_A_DURATION_REPRESENTATION_CAN_NOT_BE_A_DURATION, ());
+    BOOST_CHRONO_STATIC_ASSERT(boost::ratio_detail::is_ratio<Period>::value, 
+            BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_DURATION_MUST_BE_A_STD_RATIO, ());
+    BOOST_CHRONO_STATIC_ASSERT(Period::num>0, 
+            BOOST_CHRONO_DURATION_PERIOD_MUST_BE_POSITIVE, ());
     public:
         typedef Rep rep;
         typedef Period period;
@@ -511,259 +477,298 @@
         duration& operator--()      {--rep_; return *this;}
         duration  operator--(int)   {return duration(rep_--);}
 
-        duration& operator+=(const duration& d) {rep_ += d.count(); return *this;}
-        duration& operator-=(const duration& d) {rep_ -= d.count(); return *this;}
+        duration& operator+=(const duration& d) 
+        {
+            rep_ += d.count(); return *this;
+        }
+        duration& operator-=(const duration& d) 
+        {
+            rep_ -= d.count(); return *this;
+        }
 
         duration& operator*=(const rep& rhs) {rep_ *= rhs; return *this;}
         duration& operator/=(const rep& rhs) {rep_ /= rhs; return *this;}
         duration& operator%=(const rep& rhs) {rep_ %= rhs; return *this;}
-        duration& operator%=(const duration& rhs) {rep_ %= rhs.count(); return *this;};
+        duration& operator%=(const duration& rhs) 
+        {
+            rep_ %= rhs.count(); return *this;
+        };
         // 20.9.3.4 duration special values [time.duration.special]
 
-        static BOOST_CHRONO_CONSTEXPR duration zero() {return duration(duration_values<rep>::zero());}
-        static BOOST_CHRONO_CONSTEXPR duration min BOOST_PREVENT_MACRO_SUBSTITUTION ()  {return duration((duration_values<rep>::min)());}
-        static BOOST_CHRONO_CONSTEXPR duration max BOOST_PREVENT_MACRO_SUBSTITUTION ()  {return duration((duration_values<rep>::max)());}
+        static BOOST_CHRONO_CONSTEXPR duration zero() 
+        {
+            return duration(duration_values<rep>::zero());
+        }
+        static BOOST_CHRONO_CONSTEXPR duration min BOOST_PREVENT_MACRO_SUBSTITUTION ()  
+        {
+            return duration((duration_values<rep>::min)());
+        }
+        static BOOST_CHRONO_CONSTEXPR duration max BOOST_PREVENT_MACRO_SUBSTITUTION ()  
+        {
+            return duration((duration_values<rep>::max)());
+        }
     };
 
 //----------------------------------------------------------------------------//
 //      20.9.3.5 duration non-member arithmetic [time.duration.nonmember]     //
 //----------------------------------------------------------------------------//
 
-  // Duration +
+    // Duration +
 
-  template <class Rep1, class Period1, class Rep2, class Period2>
-  inline
-  typename common_type<duration<Rep1, Period1>, duration<Rep2, Period2> >::type
-  operator+(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs)
-  {
+    template <class Rep1, class Period1, class Rep2, class Period2>
+    inline
+    typename common_type<duration<Rep1, Period1>, duration<Rep2, Period2> >::type
+    operator+(const duration<Rep1, Period1>& lhs, 
+          const duration<Rep2, Period2>& rhs)
+    {
       typename common_type<duration<Rep1, Period1>,
         duration<Rep2, Period2> >::type result = lhs;
       result += rhs;
       return result;
-  }
+    }
 
-  // Duration -
+    // Duration -
 
-  template <class Rep1, class Period1, class Rep2, class Period2>
-  inline
-  typename common_type<duration<Rep1, Period1>, duration<Rep2, Period2> >::type
-  operator-(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs)
-  {
-      typename common_type<duration<Rep1, Period1>,
-        duration<Rep2, Period2> >::type result = lhs;
-      result -= rhs;
-      return result;
-  }
+    template <class Rep1, class Period1, class Rep2, class Period2>
+    inline
+    typename common_type<duration<Rep1, Period1>, duration<Rep2, Period2> >::type
+    operator-(const duration<Rep1, Period1>& lhs, 
+          const duration<Rep2, Period2>& rhs)
+    {
+        typename common_type<duration<Rep1, Period1>,
+            duration<Rep2, Period2> >::type result = lhs;
+        result -= rhs;
+        return result;
+    }
 
-  // Duration *
+    // Duration *
 
-  template <class Rep1, class Period, class Rep2>
-  inline
-  typename boost::enable_if <
-    mpl::and_ <
+    template <class Rep1, class Period, class Rep2>
+    inline
+    typename boost::enable_if <
+        mpl::and_ <
         boost::is_convertible<Rep1, typename common_type<Rep1, Rep2>::type>,
         boost::is_convertible<Rep2, typename common_type<Rep1, Rep2>::type>
-    >,
-    duration<typename common_type<Rep1, Rep2>::type, Period>
-  >::type
-  operator*(const duration<Rep1, Period>& d, const Rep2& s)
-  {
-      typedef typename common_type<Rep1, Rep2>::type CR;
-      duration<CR, Period> r = d;
-      r *= static_cast<CR>(s);
-      return r;
-  }
-
-  template <class Rep1, class Period, class Rep2>
-  inline
-  typename boost::enable_if <
-    mpl::and_ <
+        >,
+        duration<typename common_type<Rep1, Rep2>::type, Period>
+    >::type
+    operator*(const duration<Rep1, Period>& d, const Rep2& s)
+    {
+        typedef typename common_type<Rep1, Rep2>::type CR;
+            duration<CR, Period> r = d;
+        r *= static_cast<CR>(s);
+        return r;
+    }
+
+    template <class Rep1, class Period, class Rep2>
+    inline
+    typename boost::enable_if <
+        mpl::and_ <
         boost::is_convertible<Rep1, typename common_type<Rep1, Rep2>::type>,
         boost::is_convertible<Rep2, typename common_type<Rep1, Rep2>::type>
-    >,
-    duration<typename common_type<Rep1, Rep2>::type, Period>
-  >::type
-  operator*(const Rep1& s, const duration<Rep2, Period>& d)
-  {
-      return d * s;
-  }
-
-  // Duration /
-
-  template <class Rep1, class Period, class Rep2>
-  inline
-  typename boost::disable_if <boost::chrono::detail::is_duration<Rep2>,
-    typename boost::chrono::detail::duration_divide_result<duration<Rep1, Period>, Rep2>::type
-  >::type
-  operator/(const duration<Rep1, Period>& d, const Rep2& s)
-  {
-      typedef typename common_type<Rep1, Rep2>::type CR;
-      duration<CR, Period> r = d;
-      r /= static_cast<CR>(s);
-      return r;
-  }
-
-  template <class Rep1, class Period1, class Rep2, class Period2>
-  inline
-  typename common_type<Rep1, Rep2>::type
-  operator/(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs)
-  {
-      typedef typename common_type<duration<Rep1, Period1>,
+        >,
+        duration<typename common_type<Rep1, Rep2>::type, Period>
+    >::type
+    operator*(const Rep1& s, const duration<Rep2, Period>& d)
+    {
+        return d * s;
+    }
+
+    // Duration /
+
+    template <class Rep1, class Period, class Rep2>
+    inline
+    typename boost::disable_if <boost::chrono::detail::is_duration<Rep2>,
+      typename boost::chrono::detail::duration_divide_result<
+        duration<Rep1, Period>, Rep2>::type
+    >::type
+    operator/(const duration<Rep1, Period>& d, const Rep2& s)
+    {
+        typedef typename common_type<Rep1, Rep2>::type CR;
+          duration<CR, Period> r = d;
+        r /= static_cast<CR>(s);
+        return r;
+    }
+
+    template <class Rep1, class Period1, class Rep2, class Period2>
+    inline
+    typename common_type<Rep1, Rep2>::type
+    operator/(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs)
+    {
+        typedef typename common_type<duration<Rep1, Period1>,
                                    duration<Rep2, Period2> >::type CD;
-      return CD(lhs).count() / CD(rhs).count();
-  }
+        return CD(lhs).count() / CD(rhs).count();
+    }
+
+    template <class Rep1, class Rep2, class Period>
+    inline
+    typename boost::disable_if <boost::chrono::detail::is_duration<Rep1>,
+      typename boost::chrono::detail::duration_divide_result2<
+        Rep1, duration<Rep2, Period> >::type
+      >::type
+    operator/(const Rep1& s, const duration<Rep2, Period>& d)
+    {
+        typedef typename common_type<Rep1, Rep2>::type CR;
+        duration<CR, Period> r = d;
+        //return static_cast<CR>(r.count()) / static_cast<CR>(s);
+        return  static_cast<CR>(s)/r.count();
+    }
 
-  template <class Rep1, class Rep2, class Period>
-  inline
-  typename boost::disable_if <boost::chrono::detail::is_duration<Rep1>,
-    typename boost::chrono::detail::duration_divide_result2<Rep1, duration<Rep2, Period> >::type
-  >::type
-  operator/(const Rep1& s, const duration<Rep2, Period>& d)
-  {
-      typedef typename common_type<Rep1, Rep2>::type CR;
-      duration<CR, Period> r = d;
-      //return static_cast<CR>(r.count()) / static_cast<CR>(s);
-      return  static_cast<CR>(s)/r.count();
-  }
-
-  // Duration %
-
-  template <class Rep1, class Period, class Rep2>
-  typename boost::disable_if <boost::chrono::detail::is_duration<Rep2>,
-    typename boost::chrono::detail::duration_modulo_result<duration<Rep1, Period>, Rep2>::type
-  >::type
-  operator%(const duration<Rep1, Period>& d, const Rep2& s) {
-    typedef typename common_type<Rep1, Rep2>::type CR;
-    duration<CR, Period> r = d;
-    r %= static_cast<CR>(s);
-    return r;
-  }
-
-  template <class Rep1, class Period1, class Rep2, class Period2>
-  typename common_type<duration<Rep1, Period1>, duration<Rep2, Period2> >::type
-  operator%(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs) {
-    typedef typename common_type<duration<Rep1, Period1>,
+    // Duration %
+
+    template <class Rep1, class Period, class Rep2>
+    typename boost::disable_if <boost::chrono::detail::is_duration<Rep2>,
+      typename boost::chrono::detail::duration_modulo_result<
+        duration<Rep1, Period>, Rep2>::type
+    >::type
+    operator%(const duration<Rep1, Period>& d, const Rep2& s) 
+    {
+        typedef typename common_type<Rep1, Rep2>::type CR;
+        duration<CR, Period> r = d;
+        r %= static_cast<CR>(s);
+        return r;
+    }
+
+    template <class Rep1, class Period1, class Rep2, class Period2>
+    typename common_type<duration<Rep1, Period1>, duration<Rep2, Period2> >::type
+    operator%(const duration<Rep1, Period1>& lhs, 
+          const duration<Rep2, Period2>& rhs) {
+        typedef typename common_type<duration<Rep1, Period1>,
                                  duration<Rep2, Period2> >::type CD;
-    CD r(lhs);
-    r%=CD(rhs);
-    return r;
-  }
+        CD r(lhs);
+        r%=CD(rhs);
+        return r;
+    }
 
 
 //----------------------------------------------------------------------------//
 //      20.9.3.6 duration comparisons [time.duration.comparisons]             //
 //----------------------------------------------------------------------------//
 
-  namespace detail
-  {
+namespace detail
+{
     template <class LhsDuration, class RhsDuration>
     struct duration_eq
     {
         bool operator()(const LhsDuration& lhs, const RhsDuration& rhs)
-            {
-                typedef typename common_type<LhsDuration, RhsDuration>::type CD;
-                return CD(lhs).count() == CD(rhs).count();
-            }
+        {
+            typedef typename common_type<LhsDuration, RhsDuration>::type CD;
+            return CD(lhs).count() == CD(rhs).count();
+        }
     };
 
     template <class LhsDuration>
     struct duration_eq<LhsDuration, LhsDuration>
     {
         bool operator()(const LhsDuration& lhs, const LhsDuration& rhs)
-            {return lhs.count() == rhs.count();}
+        {
+            return lhs.count() == rhs.count();
+        }
     };
 
     template <class LhsDuration, class RhsDuration>
     struct duration_lt
     {
         bool operator()(const LhsDuration& lhs, const RhsDuration& rhs)
-            {
-                typedef typename common_type<LhsDuration, RhsDuration>::type CD;
-                return CD(lhs).count() < CD(rhs).count();
-            }
+        {
+            typedef typename common_type<LhsDuration, RhsDuration>::type CD;
+            return CD(lhs).count() < CD(rhs).count();
+        }
     };
 
     template <class LhsDuration>
     struct duration_lt<LhsDuration, LhsDuration>
     {
         bool operator()(const LhsDuration& lhs, const LhsDuration& rhs)
-            {return lhs.count() < rhs.count();}
+        {
+            return lhs.count() < rhs.count();
+        }
     };
 
-  } // namespace detail
+} // namespace detail
 
-  // Duration ==
+    // Duration ==
 
-  template <class Rep1, class Period1, class Rep2, class Period2>
-  inline
-  bool
-  operator==(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs)
-  {
-      return boost::chrono::detail::duration_eq<duration<Rep1, Period1>, duration<Rep2, Period2> >()(lhs, rhs);
-  }
-
-  // Duration !=
-
-  template <class Rep1, class Period1, class Rep2, class Period2>
-  inline
-  bool
-  operator!=(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs)
-  {
-      return !(lhs == rhs);
-  }
-
-  // Duration <
-
-  template <class Rep1, class Period1, class Rep2, class Period2>
-  inline
-  bool
-  operator< (const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs)
-  {
-      return boost::chrono::detail::duration_lt<duration<Rep1, Period1>, duration<Rep2, Period2> >()(lhs, rhs);
-  }
-
-  // Duration >
-
-  template <class Rep1, class Period1, class Rep2, class Period2>
-  inline
-  bool
-  operator> (const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs)
-  {
-      return rhs < lhs;
-  }
-
-  // Duration <=
-
-  template <class Rep1, class Period1, class Rep2, class Period2>
-  inline
-  bool
-  operator<=(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs)
-  {
-      return !(rhs < lhs);
-  }
-
-  // Duration >=
-
-  template <class Rep1, class Period1, class Rep2, class Period2>
-  inline
-  bool
-  operator>=(const duration<Rep1, Period1>& lhs, const duration<Rep2, Period2>& rhs)
-  {
-      return !(lhs < rhs);
-  }
+    template <class Rep1, class Period1, class Rep2, class Period2>
+    inline
+    bool
+    operator==(const duration<Rep1, Period1>& lhs, 
+          const duration<Rep2, Period2>& rhs)
+    {
+        return boost::chrono::detail::duration_eq<
+            duration<Rep1, Period1>, duration<Rep2, Period2> >()(lhs, rhs);
+    }
+
+    // Duration !=
+
+    template <class Rep1, class Period1, class Rep2, class Period2>
+    inline
+    bool
+    operator!=(const duration<Rep1, Period1>& lhs, 
+          const duration<Rep2, Period2>& rhs)
+    {
+        return !(lhs == rhs);
+    }
+
+    // Duration <
+
+    template <class Rep1, class Period1, class Rep2, class Period2>
+    inline
+    bool
+    operator< (const duration<Rep1, Period1>& lhs, 
+          const duration<Rep2, Period2>& rhs)
+    {
+        return boost::chrono::detail::duration_lt<
+          duration<Rep1, Period1>, duration<Rep2, Period2> >()(lhs, rhs);
+    }
+
+    // Duration >
+
+    template <class Rep1, class Period1, class Rep2, class Period2>
+    inline
+    bool
+    operator> (const duration<Rep1, Period1>& lhs,
+          const duration<Rep2, Period2>& rhs)
+    {
+        return rhs < lhs;
+    }
+
+    // Duration <=
+
+    template <class Rep1, class Period1, class Rep2, class Period2>
+    inline
+    bool
+    operator<=(const duration<Rep1, Period1>& lhs, 
+          const duration<Rep2, Period2>& rhs)
+    {
+        return !(rhs < lhs);
+    }
+
+    // Duration >=
+
+    template <class Rep1, class Period1, class Rep2, class Period2>
+    inline
+    bool
+    operator>=(const duration<Rep1, Period1>& lhs, 
+          const duration<Rep2, Period2>& rhs)
+    {
+        return !(lhs < rhs);
+    }
 
 //----------------------------------------------------------------------------//
 //      20.9.3.7 duration_cast [time.duration.cast]                           //
 //----------------------------------------------------------------------------//
 
-  // Compile-time select the most efficient algorithm for the conversion...
-  template <class ToDuration, class Rep, class Period>
-  inline
-  typename boost::enable_if <boost::chrono::detail::is_duration<ToDuration>, ToDuration>::type
-  duration_cast(const duration<Rep, Period>& fd)
-  {
-      return boost::chrono::detail::duration_cast<duration<Rep, Period>, ToDuration>()(fd);
-  }
+    // Compile-time select the most efficient algorithm for the conversion...
+    template <class ToDuration, class Rep, class Period>
+    inline
+    typename boost::enable_if <
+      boost::chrono::detail::is_duration<ToDuration>, ToDuration>::type
+    duration_cast(const duration<Rep, Period>& fd)
+    {
+        return boost::chrono::detail::duration_cast<
+          duration<Rep, Period>, ToDuration>()(fd);
+    }
 
 
 //----------------------------------------------------------------------------//
@@ -772,10 +777,11 @@
 //----------------------------------------------------------------------------//
 
 #ifdef __GNUC__
-    // see comment above in section 20.9.3 Class template duration [time.duration]
+  // see comment above in section 20.9.3 Class template duration [time.duration]
     template <class Rep, class Period>
     template <class Rep2, class Period2>
-    BOOST_CHRONO_CONSTEXPR duration<Rep, Period>::duration(const duration<Rep2, Period2>& d,
+    BOOST_CHRONO_CONSTEXPR duration<Rep, Period>::duration(
+        const duration<Rep2, Period2>& d,
         typename boost::enable_if <
             mpl::or_ <
                 treat_as_floating_point<rep>,
@@ -785,7 +791,8 @@
                 >
             >
             >::type*)
-          : rep_(duration_cast<duration>(d).count()) {}
+          : rep_(duration_cast<duration>(d).count()) 
+   {}
 #endif
 
 } // namespace chrono
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-10-20 13:00:47 EDT (Wed, 20 Oct 2010)
@@ -32,7 +32,8 @@
         typedef chrono::time_point<process_real_cpu_clock>    time_point;
         static const bool is_monotonic =             true;
 
-        static BOOST_CHRONO_INLINE time_point now( system::error_code & ec = system::throws );
+        static BOOST_CHRONO_INLINE time_point now(
+                system::error_code & ec = BOOST_CHRONO_THROWS );
     };
 
     class BOOST_CHRONO_DECL process_user_cpu_clock {
@@ -43,7 +44,8 @@
         typedef chrono::time_point<process_user_cpu_clock>    time_point;
         static const bool is_monotonic =             true;
 
-        static BOOST_CHRONO_INLINE time_point now( system::error_code & ec = system::throws );
+        static BOOST_CHRONO_INLINE time_point now( 
+                system::error_code & ec = BOOST_CHRONO_THROWS );
     };
 
     class BOOST_CHRONO_DECL process_system_cpu_clock {
@@ -54,10 +56,14 @@
         typedef chrono::time_point<process_system_cpu_clock>    time_point;
         static const bool is_monotonic =             true;
 
-        static BOOST_CHRONO_INLINE time_point now( system::error_code & ec = system::throws );
+        static BOOST_CHRONO_INLINE time_point now( 
+                system::error_code & ec = BOOST_CHRONO_THROWS );
     };
 
-        struct process_cpu_clock_times : arithmetic<process_cpu_clock_times, multiplicative<process_cpu_clock_times, process_real_cpu_clock::rep, less_than_comparable<process_cpu_clock_times> > >
+        struct process_cpu_clock_times 
+            : arithmetic<process_cpu_clock_times, 
+            multiplicative<process_cpu_clock_times, process_real_cpu_clock::rep, 
+            less_than_comparable<process_cpu_clock_times> > >
         {
             typedef process_real_cpu_clock::rep rep;
             process_cpu_clock_times()
@@ -82,43 +88,53 @@
                         system==rhs.system);
             }
 
-            process_cpu_clock_times operator+=(process_cpu_clock_times const& rhs) {
+            process_cpu_clock_times operator+=(
+                    process_cpu_clock_times const& rhs) 
+            {
                 real+=rhs.real;
                 user+=rhs.user;
                 system+=rhs.system;
                 return *this;
             }
-            process_cpu_clock_times operator-=(process_cpu_clock_times const& rhs) {
+            process_cpu_clock_times operator-=(
+                    process_cpu_clock_times const& rhs) 
+            {
                 real-=rhs.real;
                 user-=rhs.user;
                 system-=rhs.system;
                 return *this;
             }
-            process_cpu_clock_times operator*=(process_cpu_clock_times const& rhs) {
+            process_cpu_clock_times operator*=(
+                    process_cpu_clock_times const& rhs) 
+            {
                 real*=rhs.real;
                 user*=rhs.user;
                 system*=rhs.system;
                 return *this;
             }
-            process_cpu_clock_times operator*=(rep const& rhs) {
+            process_cpu_clock_times operator*=(rep const& rhs) 
+            {
                 real*=rhs;
                 user*=rhs;
                 system*=rhs;
                 return *this;
             }
-            process_cpu_clock_times operator/=(process_cpu_clock_times const& rhs) {
+            process_cpu_clock_times operator/=(process_cpu_clock_times const& rhs) 
+            {
                 real/=rhs.real;
                 user/=rhs.user;
                 system/=rhs.system;
                 return *this;
             }
-            process_cpu_clock_times operator/=(rep const& rhs) {
+            process_cpu_clock_times operator/=(rep const& rhs) 
+            {
                 real/=rhs;
                 user/=rhs;
                 system/=rhs;
                 return *this;
             }
-            bool operator<(process_cpu_clock_times const & rhs) const {
+            bool operator<(process_cpu_clock_times const & rhs) const 
+            {
                 if (real < rhs.real) return true;
                 if (real > rhs.real) return false;
                 if (user < rhs.user) return true;
@@ -128,12 +144,14 @@
             }
 
             template <class CharT, class Traits>
-            void print(std::basic_ostream<CharT, Traits>& os) const {
+            void print(std::basic_ostream<CharT, Traits>& os) const 
+            {
                 os <<  "{"<< real <<";"<< user <<";"<< system << "}";
             }
 
             template <class CharT, class Traits>
-            void read(std::basic_istream<CharT, Traits>& is) const {
+            void read(std::basic_istream<CharT, Traits>& is) const 
+            {
                 typedef std::istreambuf_iterator<CharT, Traits> in_iterator;
                 in_iterator i(is);
                 in_iterator e;
@@ -162,17 +180,24 @@
         typedef chrono::time_point<process_cpu_clock>  time_point;
         static const bool is_monotonic =           true;
 
-        static BOOST_CHRONO_INLINE time_point now( system::error_code & ec = system::throws );
+        static BOOST_CHRONO_INLINE time_point now( 
+                system::error_code & ec = BOOST_CHRONO_THROWS );
     };
 
     template <class CharT, class Traits>
-    std::basic_ostream<CharT, Traits>& operator<<(std::basic_ostream<CharT, Traits>& os, process_cpu_clock_times const& rhs) {
+    std::basic_ostream<CharT, Traits>& 
+    operator<<(std::basic_ostream<CharT, Traits>& os, 
+            process_cpu_clock_times const& rhs) 
+    {
         rhs.print(os);
         return os;
     }
 
     template <class CharT, class Traits>
-    std::basic_istream<CharT, Traits>& operator<<(std::basic_istream<CharT, Traits>& is, process_cpu_clock_times const& rhs) {
+    std::basic_istream<CharT, Traits>& 
+    operator<<(std::basic_istream<CharT, Traits>& is, 
+            process_cpu_clock_times const& rhs) 
+    {
         rhs.read(is);
         return is;
     }
@@ -182,13 +207,18 @@
     {
         typedef process_cpu_clock_times Rep;
     public:
-        static Rep zero() {return Rep();}
-        static Rep max BOOST_PREVENT_MACRO_SUBSTITUTION ()  {
+        static Rep zero() 
+        {
+            return Rep();
+        }
+        static Rep max BOOST_PREVENT_MACRO_SUBSTITUTION ()  
+        {
           return Rep((std::numeric_limits<process_real_cpu_clock::rep>::max)(),
                       (std::numeric_limits<process_user_cpu_clock::rep>::max)(),
                       (std::numeric_limits<process_system_cpu_clock::rep>::max)());
         }
-        static Rep min BOOST_PREVENT_MACRO_SUBSTITUTION ()  {
+        static Rep min BOOST_PREVENT_MACRO_SUBSTITUTION ()  
+        {
           return Rep((std::numeric_limits<process_real_cpu_clock::rep>::min)(),
                       (std::numeric_limits<process_user_cpu_clock::rep>::min)(),
                       (std::numeric_limits<process_system_cpu_clock::rep>::min)());
@@ -207,17 +237,22 @@
 
         public:
         static const bool is_specialized = true;
-        static Rep min BOOST_PREVENT_MACRO_SUBSTITUTION ()  {
+        static Rep min BOOST_PREVENT_MACRO_SUBSTITUTION ()  
+        {
           return Rep((std::numeric_limits<boost::chrono::process_real_cpu_clock::rep>::min)(),
                       (std::numeric_limits<boost::chrono::process_user_cpu_clock::rep>::min)(),
                       (std::numeric_limits<boost::chrono::process_system_cpu_clock::rep>::min)());
         }
-        static Rep max BOOST_PREVENT_MACRO_SUBSTITUTION ()  {
+        static Rep max BOOST_PREVENT_MACRO_SUBSTITUTION ()  
+        {
           return Rep((std::numeric_limits<boost::chrono::process_real_cpu_clock::rep>::max)(),
                       (std::numeric_limits<boost::chrono::process_user_cpu_clock::rep>::max)(),
                       (std::numeric_limits<boost::chrono::process_system_cpu_clock::rep>::max)());
         }
-        static Rep lowest() throw() { return (min)(); }
+        static Rep lowest() throw() 
+        { 
+            return (min)(); 
+        }
         static const int digits = std::numeric_limits<boost::chrono::process_real_cpu_clock::rep>::digits+
                         std::numeric_limits<boost::chrono::process_user_cpu_clock::rep>::digits+
                         std::numeric_limits<boost::chrono::process_system_cpu_clock::rep>::digits;
Modified: sandbox/chrono/boost/chrono/process_times.hpp
==============================================================================
--- sandbox/chrono/boost/chrono/process_times.hpp	(original)
+++ sandbox/chrono/boost/chrono/process_times.hpp	2010-10-20 13:00:47 EDT (Wed, 20 Oct 2010)
@@ -17,7 +17,7 @@
 #include <boost/cstdint.hpp>
 #include <string>
 #include <ostream>
-//#include <iostream>
+#include <boost/chrono/detail/system.hpp>
 
 #ifndef BOOST_CHRONO_INLINED
 #include <boost/config/abi_prefix.hpp> // must be the last #include
@@ -26,8 +26,8 @@
 
 namespace boost
 {
-  namespace chrono
-  {
+namespace chrono
+{
 //--------------------------------------------------------------------------------------//
 //                                  process_clock                                       //
 //--------------------------------------------------------------------------------------//
@@ -55,9 +55,9 @@
         };
 
         static BOOST_CHRONO_INLINE void now( durations & times,
-                         system::error_code & ec = system::throws );
+                         system::error_code & ec = BOOST_CHRONO_THROWS );
         static BOOST_CHRONO_INLINE void now( time_points & times,
-                         system::error_code & ec = system::throws );
+                         system::error_code & ec = BOOST_CHRONO_THROWS );
     };
 
 
@@ -82,19 +82,19 @@
       typedef process_clock::duration                duration;
       typedef process_clock::time_point              time_point;
 
-      explicit process_timer( system::error_code & ec = system::throws )
+      explicit process_timer( system::error_code & ec = BOOST_CHRONO_THROWS )
       {
         start(ec);
       }
 
-     ~process_timer() {}  // never throws
+     ~process_timer() {}  // never throws()
 
-      void  start( system::error_code & ec = system::throws )
+      void  start( system::error_code & ec = BOOST_CHRONO_THROWS )
       {
         process_clock::now( m_start, ec );
       }
 
-      void  elapsed( process_times & times, system::error_code & ec = system::throws )
+      void  elapsed( process_times & times, system::error_code & ec = BOOST_CHRONO_THROWS )
       {
         process_times end;
         process_clock::now( end, ec );
@@ -124,38 +124,38 @@
       // high associated cost, even when the standard streams are not used.
 
       BOOST_CHRONO_INLINE
-      explicit run_timer( system::error_code & ec = system::throws );
+      explicit run_timer( system::error_code & ec = BOOST_CHRONO_THROWS );
       BOOST_CHRONO_INLINE
       explicit run_timer( std::ostream & os,
-        system::error_code & ec = system::throws );
+        system::error_code & ec = BOOST_CHRONO_THROWS );
 
       BOOST_CHRONO_INLINE
       explicit run_timer( const std::string & format,
-        system::error_code & ec = system::throws );
+        system::error_code & ec = BOOST_CHRONO_THROWS );
       BOOST_CHRONO_INLINE
       run_timer( std::ostream & os, const std::string & format,
-        system::error_code & ec = system::throws );
+        system::error_code & ec = BOOST_CHRONO_THROWS );
 
       BOOST_CHRONO_INLINE
       run_timer( const std::string & format, int places,
-        system::error_code & ec = system::throws );
+        system::error_code & ec = BOOST_CHRONO_THROWS );
       BOOST_CHRONO_INLINE
       run_timer( std::ostream & os, const std::string & format,
-        int places, system::error_code & ec = system::throws );
+        int places, system::error_code & ec = BOOST_CHRONO_THROWS );
 
       BOOST_CHRONO_INLINE
       explicit run_timer( int places,
-        system::error_code & ec = system::throws );
+        system::error_code & ec = BOOST_CHRONO_THROWS );
       BOOST_CHRONO_INLINE
       run_timer( std::ostream & os, int places,
-        system::error_code & ec = system::throws );
+        system::error_code & ec = BOOST_CHRONO_THROWS );
 
       BOOST_CHRONO_INLINE
       run_timer( int places, const std::string & format,
-        system::error_code & ec = system::throws );
+        system::error_code & ec = BOOST_CHRONO_THROWS );
       BOOST_CHRONO_INLINE
       run_timer( std::ostream & os, int places, const std::string & format,
-        system::error_code & ec = system::throws );
+        system::error_code & ec = BOOST_CHRONO_THROWS );
 
       ~run_timer()  // never throws
       {
@@ -163,13 +163,13 @@
         if ( !reported() ) report( ec );
       }
 
-      BOOST_CHRONO_INLINE void  start( system::error_code & ec = system::throws )
+      BOOST_CHRONO_INLINE void  start( system::error_code & ec = BOOST_CHRONO_THROWS )
       {
         m_reported = false;
         process_timer::start( ec );
       }
 
-      BOOST_CHRONO_INLINE void  report( system::error_code & ec = system::throws );
+      BOOST_CHRONO_INLINE void  report( system::error_code & ec = BOOST_CHRONO_THROWS );
 
       BOOST_CHRONO_INLINE void  test_report( duration real_, duration user_, duration system_ );
 
Modified: sandbox/chrono/boost/chrono/time_point.hpp
==============================================================================
--- sandbox/chrono/boost/chrono/time_point.hpp	(original)
+++ sandbox/chrono/boost/chrono/time_point.hpp	2010-10-20 13:00:47 EDT (Wed, 20 Oct 2010)
@@ -31,6 +31,8 @@
 #define BOOST_CHRONO_TIME_POINT_HPP
 
 #include <boost/chrono/duration.hpp>
+#include <iostream>
+#include <boost/chrono/detail/system.hpp>
 
 
 //----------------------------------------------------------------------------//
@@ -74,44 +76,61 @@
 
 namespace chrono {
 
-  // time_point arithmetic
-  template <class Clock, class Duration1, class Rep2, class Period2>
-    time_point<Clock, typename common_type<Duration1, duration<Rep2, Period2> >::type>
-    operator+(const time_point<Clock, Duration1>& lhs, const duration<Rep2, Period2>& rhs);
-  template <class Rep1, class Period1, class Clock, class Duration2>
-    time_point<Clock, typename common_type<duration<Rep1, Period1>, Duration2>::type>
-    operator+(const duration<Rep1, Period1>& lhs, const time_point<Clock, Duration2>& rhs);
-  template <class Clock, class Duration1, class Rep2, class Period2>
-    time_point<Clock, typename common_type<Duration1, duration<Rep2, Period2> >::type>
-    operator-(const time_point<Clock, Duration1>& lhs, const duration<Rep2, Period2>& rhs);
-  template <class Clock, class Duration1, class Duration2>
+    // time_point arithmetic
+    template <class Clock, class Duration1, class Rep2, class Period2>
+    time_point<Clock, 
+        typename common_type<Duration1, duration<Rep2, Period2> >::type>
+    operator+(
+            const time_point<Clock, Duration1>& lhs, 
+            const duration<Rep2, Period2>& rhs);
+    template <class Rep1, class Period1, class Clock, class Duration2>
+    time_point<Clock, 
+        typename common_type<duration<Rep1, Period1>, Duration2>::type>
+    operator+(
+            const duration<Rep1, Period1>& lhs, 
+            const time_point<Clock, Duration2>& rhs);
+    template <class Clock, class Duration1, class Rep2, class Period2>
+    time_point<Clock, 
+        typename common_type<Duration1, duration<Rep2, Period2> >::type>
+    operator-(
+            const time_point<Clock, Duration1>& lhs, 
+            const duration<Rep2, Period2>& rhs);
+    template <class Clock, class Duration1, class Duration2>
     typename common_type<Duration1, Duration2>::type
-    operator-(const time_point<Clock, Duration1>& lhs, const time_point<Clock,
+    operator-(
+            const time_point<Clock, Duration1>& lhs, 
+            const time_point<Clock,
             Duration2>& rhs);
 
-  // time_point comparisons
-  template <class Clock, class Duration1, class Duration2>
-  bool operator==(const time_point<Clock, Duration1>& lhs, const time_point<Clock,
-                  Duration2>& rhs);
-  template <class Clock, class Duration1, class Duration2>
-  bool operator!=(const time_point<Clock, Duration1>& lhs, const time_point<Clock,
-                  Duration2>& rhs);
-  template <class Clock, class Duration1, class Duration2>
-  bool operator< (const time_point<Clock, Duration1>& lhs, const time_point<Clock,
-                  Duration2>& rhs);
-  template <class Clock, class Duration1, class Duration2>
-  bool operator<=(const time_point<Clock, Duration1>& lhs, const time_point<Clock,
-                  Duration2>& rhs);
-  template <class Clock, class Duration1, class Duration2>
-  bool operator> (const time_point<Clock, Duration1>& lhs, const time_point<Clock,
-                  Duration2>& rhs);
-  template <class Clock, class Duration1, class Duration2>
-  bool operator>=(const time_point<Clock, Duration1>& lhs, const time_point<Clock,
-                  Duration2>& rhs);
-
-  // time_point_cast
-  template <class ToDuration, class Clock, class Duration>
-  time_point<Clock, ToDuration> time_point_cast(const time_point<Clock, Duration>& t);
+    // time_point comparisons
+    template <class Clock, class Duration1, class Duration2>
+    bool operator==(
+          const time_point<Clock, Duration1>& lhs, 
+          const time_point<Clock, Duration2>& rhs);
+    template <class Clock, class Duration1, class Duration2>
+    bool operator!=(
+          const time_point<Clock, Duration1>& lhs, 
+          const time_point<Clock, Duration2>& rhs);
+    template <class Clock, class Duration1, class Duration2>
+    bool operator< (
+          const time_point<Clock, Duration1>& lhs, 
+          const time_point<Clock, Duration2>& rhs);
+    template <class Clock, class Duration1, class Duration2>
+    bool operator<=(
+          const time_point<Clock, Duration1>& lhs, 
+          const time_point<Clock, Duration2>& rhs);
+    template <class Clock, class Duration1, class Duration2>
+    bool operator> (
+          const time_point<Clock, Duration1>& lhs, 
+          const time_point<Clock, Duration2>& rhs);
+    template <class Clock, class Duration1, class Duration2>
+    bool operator>=(
+          const time_point<Clock, Duration1>& lhs, 
+          const time_point<Clock, Duration2>& rhs);
+
+    // time_point_cast
+    template <class ToDuration, class Clock, class Duration>
+    time_point<Clock, ToDuration> time_point_cast(const time_point<Clock, Duration>& t);
 
 //----------------------------------------------------------------------------//
 //                                                                            //
@@ -119,181 +138,202 @@
 //                                                                            //
 //----------------------------------------------------------------------------//
 
-template <class Clock, class Duration>
-  class time_point
-  {
-  BOOST_CHRONO_STATIC_ASSERT(boost::chrono::detail::is_duration<Duration>::value,
-      BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_TIME_POINT_MUST_BE_A_BOOST_CHRONO_DURATION, (Duration));
-  public:
-      typedef Clock                     clock;
-      typedef Duration                  duration;
-      typedef typename duration::rep    rep;
-      typedef typename duration::period period;
-  private:
-      duration d_;
-
-  public:
-      time_point() : d_(duration::zero()) {}
-      explicit time_point(const duration& d) : d_(d) {}
-
-      // conversions
-      template <class Duration2>
-      time_point(const time_point<clock, Duration2>& t,
-          typename boost::enable_if
-          <
-              boost::is_convertible<Duration2, duration>
-          >::type* = 0)
-              : d_(t.time_since_epoch()) {}
-
-      // observer
-
-      duration time_since_epoch() const {return d_;}
-
-      // arithmetic
-
-      time_point& operator+=(const duration& d) {d_ += d; return *this;}
-      time_point& operator-=(const duration& d) {d_ -= d; return *this;}
-
-      // special values
-
-      static BOOST_CHRONO_CONSTEXPR time_point min BOOST_PREVENT_MACRO_SUBSTITUTION () {return time_point((duration::min)());}
-      static BOOST_CHRONO_CONSTEXPR time_point max BOOST_PREVENT_MACRO_SUBSTITUTION () {return time_point((duration::max)());}
-  };
+    template <class Clock, class Duration>
+    class time_point
+    {
+        BOOST_CHRONO_STATIC_ASSERT(boost::chrono::detail::is_duration<Duration>::value,
+                BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_TIME_POINT_MUST_BE_A_BOOST_CHRONO_DURATION, (Duration));
+    public:
+        typedef Clock                     clock;
+        typedef Duration                  duration;
+        typedef typename duration::rep    rep;
+        typedef typename duration::period period;
+    private:
+        duration d_;
+
+    public:
+        time_point() : d_(duration::zero()) 
+        {}
+        explicit time_point(const duration& d) 
+              : d_(d) 
+        {}
+
+        // conversions
+        template <class Duration2>
+        time_point(const time_point<clock, Duration2>& t,
+                typename boost::enable_if
+                <
+                boost::is_convertible<Duration2, duration>
+                  >::type* = 0)
+            : d_(t.time_since_epoch()) 
+        {
+        }
+
+        // observer
+
+        duration time_since_epoch() const 
+        {
+            return d_;
+        }
+
+        // arithmetic
+
+        time_point& operator+=(const duration& d) {d_ += d; return *this;}
+        time_point& operator-=(const duration& d) {d_ -= d; return *this;}
+
+        // special values
+
+        static BOOST_CHRONO_CONSTEXPR time_point 
+        min BOOST_PREVENT_MACRO_SUBSTITUTION () 
+        {
+            return time_point((duration::min)());
+        }
+        static BOOST_CHRONO_CONSTEXPR time_point 
+        max BOOST_PREVENT_MACRO_SUBSTITUTION () 
+        {
+            return time_point((duration::max)());
+        }
+    };
 
 //----------------------------------------------------------------------------//
 //      20.9.4.5 time_point non-member arithmetic [time.point.nonmember]      //
 //----------------------------------------------------------------------------//
 
-  // time_point operator+(time_point x, duration y);
+    // time_point operator+(time_point x, duration y);
 
-  template <class Clock, class Duration1, class Rep2, class Period2>
-  inline
-  time_point<Clock, typename common_type<Duration1, duration<Rep2, Period2> >::type>
-  operator+(const time_point<Clock, Duration1>& lhs,
+    template <class Clock, class Duration1, class Rep2, class Period2>
+    inline
+    time_point<Clock, 
+        typename common_type<Duration1, duration<Rep2, Period2> >::type>
+    operator+(const time_point<Clock, Duration1>& lhs,
             const duration<Rep2, Period2>& rhs)
-  {
-      typedef time_point<Clock,
-        typename common_type<Duration1, duration<Rep2, Period2> >::type> TimeResult;
-      TimeResult r(lhs);
-      r += rhs;
-      return r;
-  }
-
-  // time_point operator+(duration x, time_point y);
-
-  template <class Rep1, class Period1, class Clock, class Duration2>
-  inline
-  time_point<Clock, typename common_type<duration<Rep1, Period1>, Duration2>::type>
-  operator+(const duration<Rep1, Period1>& lhs,
+    {
+        typedef time_point<
+            Clock,
+            typename common_type<Duration1, duration<Rep2, Period2> >::type 
+        > TimeResult;
+        TimeResult r(lhs);
+        r += rhs;
+        return r;
+    }
+
+    // time_point operator+(duration x, time_point y);
+
+    template <class Rep1, class Period1, class Clock, class Duration2>
+    inline
+    time_point<Clock, 
+        typename common_type<duration<Rep1, Period1>, Duration2>::type>
+    operator+(const duration<Rep1, Period1>& lhs,
             const time_point<Clock, Duration2>& rhs)
-  {
-      return rhs + lhs;
-  }
-
-  // time_point operator-(time_point x, duration y);
-
-  template <class Clock, class Duration1, class Rep2, class Period2>
-  inline
-  time_point<Clock, typename common_type<Duration1, duration<Rep2, Period2> >::type>
-  operator-(const time_point<Clock, Duration1>& lhs,
+    {
+        return rhs + lhs;
+    }
+
+    // time_point operator-(time_point x, duration y);
+
+    template <class Clock, class Duration1, class Rep2, class Period2>
+    inline
+    time_point<Clock, 
+        typename common_type<Duration1, duration<Rep2, Period2> >::type>
+    operator-(const time_point<Clock, Duration1>& lhs,
             const duration<Rep2, Period2>& rhs)
-  {
-      return lhs + (-rhs);
-  }
-
-  // duration operator-(time_point x, time_point y);
-
-  template <class Clock, class Duration1, class Duration2>
-  inline
-  typename common_type<Duration1, Duration2>::type
-  operator-(const time_point<Clock, Duration1>& lhs,
+    {
+        return lhs + (-rhs);
+    }
+
+    // duration operator-(time_point x, time_point y);
+
+    template <class Clock, class Duration1, class Duration2>
+    inline
+    typename common_type<Duration1, Duration2>::type
+    operator-(const time_point<Clock, Duration1>& lhs,
             const time_point<Clock, Duration2>& rhs)
-  {
-      return lhs.time_since_epoch() - rhs.time_since_epoch();
-  }
+    {
+        return lhs.time_since_epoch() - rhs.time_since_epoch();
+    }
 
 //----------------------------------------------------------------------------//
 //      20.9.4.6 time_point comparisons [time.point.comparisons]              //
 //----------------------------------------------------------------------------//
 
-  // time_point ==
+    // time_point ==
 
-  template <class Clock, class Duration1, class Duration2>
-  inline
-  bool
-  operator==(const time_point<Clock, Duration1>& lhs,
+    template <class Clock, class Duration1, class Duration2>
+    inline
+    bool
+    operator==(const time_point<Clock, Duration1>& lhs,
              const time_point<Clock, Duration2>& rhs)
-  {
-      return lhs.time_since_epoch() == rhs.time_since_epoch();
-  }
-
-  // time_point !=
-
-  template <class Clock, class Duration1, class Duration2>
-  inline
-  bool
-  operator!=(const time_point<Clock, Duration1>& lhs,
+    {
+        return lhs.time_since_epoch() == rhs.time_since_epoch();
+    }
+
+    // time_point !=
+
+    template <class Clock, class Duration1, class Duration2>
+    inline
+    bool
+    operator!=(const time_point<Clock, Duration1>& lhs,
              const time_point<Clock, Duration2>& rhs)
-  {
-      return !(lhs == rhs);
-  }
-
-  // time_point <
-
-  template <class Clock, class Duration1, class Duration2>
-  inline
-  bool
-  operator<(const time_point<Clock, Duration1>& lhs,
+    {
+        return !(lhs == rhs);
+    }
+
+    // time_point <
+
+    template <class Clock, class Duration1, class Duration2>
+    inline
+    bool
+    operator<(const time_point<Clock, Duration1>& lhs,
             const time_point<Clock, Duration2>& rhs)
-  {
-      return lhs.time_since_epoch() < rhs.time_since_epoch();
-  }
-
-  // time_point >
-
-  template <class Clock, class Duration1, class Duration2>
-  inline
-  bool
-  operator>(const time_point<Clock, Duration1>& lhs,
+    {
+        return lhs.time_since_epoch() < rhs.time_since_epoch();
+    }
+
+    // time_point >
+
+    template <class Clock, class Duration1, class Duration2>
+    inline
+    bool
+    operator>(const time_point<Clock, Duration1>& lhs,
             const time_point<Clock, Duration2>& rhs)
-  {
-      return rhs < lhs;
-  }
-
-  // time_point <=
-
-  template <class Clock, class Duration1, class Duration2>
-  inline
-  bool
-  operator<=(const time_point<Clock, Duration1>& lhs,
+    {
+        return rhs < lhs;
+    }
+
+    // time_point <=
+
+    template <class Clock, class Duration1, class Duration2>
+    inline
+    bool
+    operator<=(const time_point<Clock, Duration1>& lhs,
              const time_point<Clock, Duration2>& rhs)
-  {
-      return !(rhs < lhs);
-  }
-
-  // time_point >=
-
-  template <class Clock, class Duration1, class Duration2>
-  inline
-  bool
-  operator>=(const time_point<Clock, Duration1>& lhs,
+    {
+        return !(rhs < lhs);
+    }
+
+    // time_point >=
+
+    template <class Clock, class Duration1, class Duration2>
+    inline
+    bool
+    operator>=(const time_point<Clock, Duration1>& lhs,
              const time_point<Clock, Duration2>& rhs)
-  {
-      return !(lhs < rhs);
-  }
+    {
+        return !(lhs < rhs);
+    }
 
 //----------------------------------------------------------------------------//
 //      20.9.4.7 time_point_cast [time.point.cast]                            //
 //----------------------------------------------------------------------------//
 
-  template <class ToDuration, class Clock, class Duration>
-  inline
-  time_point<Clock, ToDuration>
-  time_point_cast(const time_point<Clock, Duration>& t)
-  {
-      return time_point<Clock, ToDuration>(
-        duration_cast<ToDuration>(t.time_since_epoch()));
-  }
+    template <class ToDuration, class Clock, class Duration>
+    inline
+    time_point<Clock, ToDuration>
+    time_point_cast(const time_point<Clock, Duration>& t)
+    {
+        return time_point<Clock, ToDuration>(
+                duration_cast<ToDuration>(t.time_since_epoch()));
+    }
 
 } // namespace chrono
 } // namespace boost
Modified: sandbox/chrono/boost/chrono/timer.hpp
==============================================================================
--- sandbox/chrono/boost/chrono/timer.hpp	(original)
+++ sandbox/chrono/boost/chrono/timer.hpp	2010-10-20 13:00:47 EDT (Wed, 20 Oct 2010)
@@ -31,15 +31,19 @@
       typedef typename Clock::duration    duration;
       typedef typename Clock::time_point  time_point;
 
-      explicit timer( system::error_code & ec = system::throws )
-        { start(ec); }
+      explicit timer( system::error_code & ec = BOOST_CHRONO_THROWS )
+        { 
+          start(ec); 
+          }
 
      ~timer() {}  // never throws
 
-      void start( system::error_code & ec = system::throws )
-        { m_start = clock::now( ec ); }
+      void start( system::error_code & ec = BOOST_CHRONO_THROWS )
+        { 
+          m_start = clock::now( ec ); 
+          }
 
-      duration elapsed( system::error_code & ec = system::throws )
+      duration elapsed( system::error_code & ec = BOOST_CHRONO_THROWS )
         { return clock::now( ec ) - m_start; }
 
     private: