Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r82612 - in branches/release: boost/chrono boost/chrono/detail boost/chrono/detail/inlined/win boost/chrono/io boost/chrono/io_v1 libs/chrono/doc libs/chrono/example libs/chrono/src libs/chrono/test libs/chrono/test/clock libs/chrono/test/duration libs/chrono/test/io libs/chrono/test/time_point libs/chrono/test/traits
From: vicente.botet_at_[hidden]
Date: 2013-01-25 14:38:50


Author: viboes
Date: 2013-01-25 14:38:49 EST (Fri, 25 Jan 2013)
New Revision: 82612
URL: http://svn.boost.org/trac/boost/changeset/82612

Log:
Chrono: merge [82562][82663].
Properties modified:
   branches/release/boost/chrono/detail/ (props changed)
   branches/release/boost/chrono/io/ (props changed)
   branches/release/boost/chrono/io_v1/ (props changed)
   branches/release/libs/chrono/example/ (props changed)
   branches/release/libs/chrono/src/ (props changed)
   branches/release/libs/chrono/test/clock/ (props changed)
   branches/release/libs/chrono/test/duration/ (props changed)
   branches/release/libs/chrono/test/io/ (props changed)
   branches/release/libs/chrono/test/time_point/ (props changed)
   branches/release/libs/chrono/test/traits/ (props changed)
   branches/release/libs/chrono/test/win32_test.cpp (props changed)
Text files modified:
   branches/release/boost/chrono/config.hpp | 2
   branches/release/boost/chrono/detail/inlined/win/chrono.hpp | 20 ++----
   branches/release/boost/chrono/io/duration_io.hpp | 1
   branches/release/boost/chrono/io/time_point_io.hpp | 114 +++++++++++++++++++++++++++++++--------
   branches/release/libs/chrono/doc/chrono.qbk | 32 ++++++++--
   branches/release/libs/chrono/test/io/time_point_output.cpp | 29 ++++++++++
   6 files changed, 151 insertions(+), 47 deletions(-)

Modified: branches/release/boost/chrono/config.hpp
==============================================================================
--- branches/release/boost/chrono/config.hpp (original)
+++ branches/release/boost/chrono/config.hpp 2013-01-25 14:38:49 EST (Fri, 25 Jan 2013)
@@ -28,7 +28,7 @@
 #if ! defined BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT \
     && ! defined BOOST_CHRONO_DONT_PROVIDE_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT
 
-# define BOOST_CHRONO_DONT_PROVIDE_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT
+# define BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT
 
 #endif
 

Modified: branches/release/boost/chrono/detail/inlined/win/chrono.hpp
==============================================================================
--- branches/release/boost/chrono/detail/inlined/win/chrono.hpp (original)
+++ branches/release/boost/chrono/detail/inlined/win/chrono.hpp 2013-01-25 14:38:49 EST (Fri, 25 Jan 2013)
@@ -98,8 +98,12 @@
   #else
     boost::detail::win32::GetSystemTimeAsFileTime( &ft ); // never fails
   #endif
- return system_clock::time_point(system_clock::duration(
- (static_cast<__int64>( ft.dwHighDateTime ) << 32) | ft.dwLowDateTime));
+ return system_clock::time_point(
+ system_clock::duration(
+ ((static_cast<__int64>( ft.dwHighDateTime ) << 32) | ft.dwLowDateTime)
+ -116444736000000000LL
+ )
+ );
   }
 
 #if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
@@ -129,12 +133,6 @@
   {
       __int64 temp = t.time_since_epoch().count();
 
- # if (!defined( BOOST_MSVC )) || (BOOST_MSVC > 1300) // > VC++ 7.0
- temp -= 116444736000000000LL; // delta from epoch in microseconds
- # else
- temp -= 116444736000000000;
- # endif
-
       temp /= 10000000;
       return static_cast<std::time_t>( temp );
   }
@@ -145,12 +143,6 @@
       __int64 temp = t;
       temp *= 10000000;
 
- # if (!defined( BOOST_MSVC )) || (BOOST_MSVC > 1300) // > VC++ 7.0
- temp += 116444736000000000LL;
- # else
- temp += 116444736000000000;
- # endif
-
       return time_point(duration(temp));
   }
 

Modified: branches/release/boost/chrono/io/duration_io.hpp
==============================================================================
--- branches/release/boost/chrono/io/duration_io.hpp (original)
+++ branches/release/boost/chrono/io/duration_io.hpp 2013-01-25 14:38:49 EST (Fri, 25 Jan 2013)
@@ -121,7 +121,6 @@
     std::basic_ostream<CharT, Traits>&
     operator<<(std::basic_ostream<CharT, Traits>& os, const duration<Rep, Period>& d)
     {
- typedef std::basic_string<CharT, Traits> string_type;
       bool failed = false;
       BOOST_TRY
       {

Modified: branches/release/boost/chrono/io/time_point_io.hpp
==============================================================================
--- branches/release/boost/chrono/io/time_point_io.hpp (original)
+++ branches/release/boost/chrono/io/time_point_io.hpp 2013-01-25 14:38:49 EST (Fri, 25 Jan 2013)
@@ -34,10 +34,11 @@
 #include <string.h>
 
 #define BOOST_CHRONO_INTERNAL_TIMEGM defined BOOST_WINDOWS && ! defined(__CYGWIN__)
-//#define BOOST_CHRONO_INTERNAL_TIMEGM 1
+#define BOOST_CHRONO_INTERNAL_GMTIME defined BOOST_WINDOWS && ! defined(__CYGWIN__)
 
 #define BOOST_CHRONO_USES_INTERNAL_TIME_GET
 
+
 namespace boost
 {
   namespace chrono
@@ -199,7 +200,6 @@
             case 'd':
             case 'e':
               get_day(tm->tm_mday, b, e, err, ct);
- //std::cerr << "tm_mday= "<< tm->tm_mday << std::endl;
 
                 break;
 // case 'D':
@@ -216,7 +216,6 @@
 // break;
             case 'H':
               get_hour(tm->tm_hour, b, e, err, ct);
- //std::cerr << "tm_hour= "<< tm->tm_hour << std::endl;
                 break;
 // case 'I':
 // that_.get_12_hour(tm->tm_hour, b, e, err, ct);
@@ -226,11 +225,9 @@
 // break;
             case 'm':
               get_month(tm->tm_mon, b, e, err, ct);
- //std::cerr << "tm_mon= "<< tm->tm_mon << std::endl;
                 break;
             case 'M':
               get_minute(tm->tm_min, b, e, err, ct);
- //std::cerr << "tm_min= "<< tm->tm_min << std::endl;
                 break;
 // case 'n':
 // case 't':
@@ -276,7 +273,6 @@
                 break;
             case 'Y':
               get_year4(tm->tm_year, b, e, err, ct);
- //std::cerr << "tm_year= "<< tm->tm_year << std::endl;
                 break;
 // case '%':
 // that_.get_percent(b, e, err, ct);
@@ -541,7 +537,6 @@
     operator<<(std::basic_ostream<CharT, Traits>& os, const time_point<Clock, Duration>& tp)
     {
 
- typedef std::basic_string<CharT, Traits> string_type;
       bool failed = false;
       BOOST_TRY
       {
@@ -636,12 +631,11 @@
       return is;
     }
 
-#ifndef BOOST_CHRONO_NO_UTC_TIMEPOINT
 
     namespace detail
     {
-#if BOOST_CHRONO_INTERNAL_TIMEGM
- int is_leap(int year)
+
+ inline int32_t is_leap(int32_t year)
     {
       if(year % 400 == 0)
       return 1;
@@ -651,19 +645,19 @@
       return 1;
       return 0;
     }
- inline int days_from_0(int year)
+ inline int32_t days_from_0(int32_t year)
     {
       year--;
       return 365 * year + (year / 400) - (year/100) + (year / 4);
     }
- int days_from_1970(int year)
+ inline int32_t days_from_1970(int32_t year)
     {
       static const int days_from_0_to_1970 = days_from_0(1970);
       return days_from_0(year) - days_from_0_to_1970;
     }
- int days_from_1jan(int year,int month,int day)
+ inline int32_t days_from_1jan(int32_t year,int32_t month,int32_t day)
     {
- static const int days[2][12] =
+ static const int32_t days[2][12] =
       {
         { 0,31,59,90,120,151,181,212,243,273,304,334},
         { 0,31,60,91,121,152,182,213,244,274,305,335}
@@ -671,7 +665,7 @@
       return days[is_leap(year)][month-1] + day - 1;
     }
 
- time_t internal_timegm(std::tm const *t)
+ inline time_t internal_timegm(std::tm const *t)
     {
       int year = t->tm_year + 1900;
       int month = t->tm_mon;
@@ -696,8 +690,78 @@
 
       return result;
     }
-#endif
+
+ /**
+ * from_ymd could be made more efficient by using a table
+ * day_count_table indexed by the y%400.
+ * This table could contain the day_count
+ * by*365 + by/4 - by/100 + by/400
+ *
+ * from_ymd = (by/400)*days_by_400_years+day_count_table[by%400] +
+ * days_in_year_before[is_leap_table[by%400]][m-1] + d;
+ */
+ inline unsigned days_before_years(int32_t y)
+ {
+ return y * 365 + y / 4 - y / 100 + y / 400;
+ }
+
+ inline std::tm * internal_gmtime(std::time_t const* t, std::tm *tm)
+ {
+ if (t==0) return 0;
+ if (tm==0) return 0;
+
+ static const unsigned char
+ day_of_year_month[2][366] =
+ {
+ { 1, 1, 1, 1, 1, 1, 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 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12
+
+ } };
+
+ static const int32_t days_in_year_before[2][13] =
+ {
+ { -1, 30, 58, 89, 119, 150, 180, 211, 242, 272, 303, 333, 364 },
+ { -1, 30, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }
+ };
+
+ const time_t seconds_in_day = 3600 * 24;
+ int32_t days_since_epoch = static_cast<int32_t>(*t / seconds_in_day);
+ int32_t hms = static_cast<int32_t>(*t - seconds_in_day*days_since_epoch);
+ if (hms < 0) {
+ days_since_epoch-=1;
+ hms = seconds_in_day+hms;
+ }
+
+ int32_t x = days_since_epoch;
+ int32_t y = static_cast<int32_t> (static_cast<long long> (x + 2) * 400
+ / 146097);
+ const int32_t ym1 = y - 1;
+ int32_t doy = x - days_before_years(y);
+ const int32_t doy1 = x - days_before_years(ym1);
+ const int32_t N = std::numeric_limits<int>::digits - 1;
+ const int32_t mask1 = doy >> N; // arithmetic rshift - not portable - but nearly universal
+ const int32_t mask0 = ~mask1;
+ doy = (doy & mask0) | (doy1 & mask1);
+ y = (y & mask0) | (ym1 & mask1);
+ //y -= 32767 + 2;
+ y += 70;
+ tm->tm_year=y;
+ const bool leap = is_leap(y);
+ tm->tm_mon = day_of_year_month[leap][doy]-1;
+ tm->tm_mday = doy - days_in_year_before[leap][day_of_year_month[leap][doy] - 1];
+
+
+ tm->tm_hour = hms / 3600;
+ const int ms = hms % 3600;
+ tm->tm_min = ms / 60;
+ tm->tm_sec = ms % 60;
+
+ return tm;
+ }
+
     } // detail
+#ifndef BOOST_CHRONO_NO_UTC_TIMEPOINT
 
 #if defined BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT
 
@@ -726,19 +790,24 @@
 #if defined BOOST_WINDOWS && ! defined(__CYGWIN__)
             std::tm *tmp = 0;
             if ((tmp=localtime(&t)) == 0)
- failed = true;
- tm =*tmp;
+ failed = true;
+ else
+ tm =*tmp;
 #else
             if (localtime_r(&t, &tm) == 0) failed = true;
 #endif
           }
           else
           {
-#if defined BOOST_WINDOWS && ! defined(__CYGWIN__)
+#if BOOST_CHRONO_INTERNAL_GMTIME
+ if (detail::internal_gmtime(&t, &tm) == 0) failed = true;
+
+#elif defined BOOST_WINDOWS && ! defined(__CYGWIN__)
             std::tm *tmp = 0;
             if((tmp = gmtime(&t)) == 0)
- failed = true;
- tm = *tmp;
+ failed = true;
+ else
+ tm = *tmp;
 #else
             if (gmtime_r(&t, &tm) == 0) failed = true;
 #endif
@@ -899,6 +968,7 @@
             { '%', 'Y', '-', '%', 'm', '-', '%', 'd', ' ', '%', 'H', ':', '%', 'M', ':' };
             pb = pattern;
             pe = pb + sizeof (pattern) / sizeof(CharT);
+ tm.tm_sec=0;
 #if defined BOOST_CHRONO_USES_INTERNAL_TIME_GET
             const detail::time_get<CharT>& dtg(tg);
             dtg.get(is, 0, is, err, &tm, pb, pe);
@@ -914,7 +984,6 @@
               err |= std::ios_base::failbit;
               goto exit;
             }
- //std::cerr << "sec= "<< sec << std::endl;
             It i(is);
             It eof;
             c = *i;
@@ -924,7 +993,6 @@
               goto exit;
             }
             minutes min = detail::extract_z(i, eof, err, ct);
- //std::cerr << "min= "<< min.count() << std::endl;
 
             if (err & std::ios_base::failbit) goto exit;
             time_t t;

Modified: branches/release/libs/chrono/doc/chrono.qbk
==============================================================================
--- branches/release/libs/chrono/doc/chrono.qbk (original)
+++ branches/release/libs/chrono/doc/chrono.qbk 2013-01-25 14:38:49 EST (Fri, 25 Jan 2013)
@@ -1419,7 +1419,7 @@
 
 [section:system_clock_time_point_io `system_clock::time_point`]
 
-[warning
+[/warning
 
 This feature has been disable defining `BOOST_CHRONO_DONT_PROVIDE_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT` until a fix for the following ticket is found:
 
@@ -2600,7 +2600,7 @@
 
 [section:system_clock_time_point time_point<system_clock,D> specialization limitation]
 
-[warning
+[/warning
 
 The time_point<system_clock,D> formatter/parser specializations don't work yet. It has been disable defining `BOOST_CHRONO_DONT_PROVIDE_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT` until a fix for the following ticket is found:
 
@@ -6337,9 +6337,7 @@
         };
 
         // system_clock I/O
-
- #if defined BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT
-
+
         template <class CharT, class Traits, class __Duration>
           basic_ostream<CharT, Traits>&
           operator<<(basic_ostream<CharT, Traits>& os,
@@ -6349,7 +6347,6 @@
           basic_istream<CharT, Traits>&
           operator>>(basic_istream<CharT, Traits>& is,
                      time_point<system_clock, __Duration>& tp);
- #endif
     
         // Other Clocks I/O
 
@@ -6400,7 +6397,7 @@
 
 [section:system_clock `system_clock`]
 
-[warning
+[/warning
 
 The time_point<system_clock,D> formatter/parser specializations don't work yet. It has been disable defining `BOOST_CHRONO_DONT_PROVIDE_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT` until a fix for the following ticket is found:
 
@@ -7325,6 +7322,25 @@
 [section:history Appendix: History]
 [/==================================]
 
+[//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////]
+[section [*Version 2.0.1, January 18, 2013 - 1.53] ]
+
+[*Deprecated:]
+
+* The chrono i/o version included in Boost.Chrono 1.2.x has been completly refactored in version 2.0.0
+* chrono I/O: The manipulators __duration_short, __duration_long are depreceated. You should use the parameterized form __duration_fmt or the renamed manipulators __duration_symbol and __duration_prefix instead.
+* chrono I/O: The __duration_punct<> facet is depreceated. You should use the __get_duration_style free function to get the informations and use the __duration_units facet for localization purposes.
+
+When BOOST_CHRONO_VERSION==2 the preceding deprecated functions are not available.
+
+[*Fixes:]
+
+* [@http://svn.boost.org/trac/boost/ticket/7546 #7546] time_point<system_clock> output version 2 fails to compile assigned viboes Bugs Boost 1.53.0 --
+* [@http://svn.boost.org/trac/boost/ticket/7547 #7547] time_point<system_clock> input version 2 fails to compile assigned viboes Bugs Boost 1.53.0 --
+* [@http://svn.boost.org/trac/boost/ticket/7868 #7868] chrono_io parses time incorrectly (1.53 and 1.52)
+
+
+[endsect] [/section [*Version 2.0.1] ]
 
 [//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////]
 [section [*Version 2.0.0, October 23, 2012 - 1.52] ]
@@ -7361,7 +7377,7 @@
 
 * [@http://svn.boost.org/trac/boost/ticket/7525 #7525] Wrong clock_string<system_clock>::since() on Windows
 
-[warning
+[/warning
 
 The time_point<system_clock,D> formatter/parser specializations don't work yet. It has been disable defining `BOOST_CHRONO_DONT_PROVIDE_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT` until a fix for the following ticket is found:
 

Modified: branches/release/libs/chrono/test/io/time_point_output.cpp
==============================================================================
--- branches/release/libs/chrono/test/io/time_point_output.cpp (original)
+++ branches/release/libs/chrono/test/io/time_point_output.cpp 2013-01-25 14:38:49 EST (Fri, 25 Jan 2013)
@@ -2,12 +2,15 @@
 // Distributed under the Boost Software License, Version 1.0.
 // See http://www.boost.org/LICENSE_1_0.txt
 
+#define BOOST_CHRONO_VERSION 2
 #include <boost/chrono/chrono_io.hpp>
 #include <sstream>
 #include <boost/detail/lightweight_test.hpp>
 #include <boost/chrono/system_clocks.hpp>
 #include <boost/chrono/thread_clock.hpp>
 #include <boost/chrono/process_cpu_clocks.hpp>
+#include <locale>
+#include <ctime>
 
 template <typename Clock, typename D>
 void test_good_prefix(const char* str, D d)
@@ -156,8 +159,34 @@
   test_good_symbol_system_clock("1970-01-01 00:00:00.066667 +0000", duration<boost::int_least64_t, ratio<1, 30> > (2));
 }
 #endif
+
+void test_gmtime(std::time_t t)
+{
+ std::cout << "t " << t << std::endl;
+ std::tm tm;
+ if (boost::chrono::detail::internal_gmtime(&t, &tm))
+ {
+ std::cout << "year " << tm.tm_year << std::endl;
+ std::cout << "month " << tm.tm_mon << std::endl;
+ std::cout << "day " << tm.tm_mday << std::endl;
+ std::cout << "hour " << tm.tm_hour << std::endl;
+ std::cout << "min " << tm.tm_min << std::endl;
+ std::cout << "sec " << tm.tm_sec << std::endl;
+ }
+}
+
 int main()
 {
+// test_gmtime( 0 );
+// test_gmtime( -1 );
+// test_gmtime( +1 );
+// test_gmtime( 0 - (3600 * 24) );
+// test_gmtime( -1 - (3600 * 24) );
+// test_gmtime( +1 - (3600 * 24) );
+// test_gmtime( 0 + (3600 * 24) );
+// test_gmtime( -1 + (3600 * 24) );
+// test_gmtime( +1 + (3600 * 24) );
+
 
   std::cout << "high_resolution_clock=" << std::endl;
   check_all<boost::chrono::high_resolution_clock> ();


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk