diff --git a/boost/date_time/microsec_time_clock.hpp b/boost/date_time/microsec_time_clock.hpp
index bffc741..9c19c6d 100644
a
|
b
|
namespace date_time {
|
104 | 104 | |
105 | 105 | //The following line will adjust the fractional second tick in terms |
106 | 106 | //of the current time system. For example, if the time system |
107 | | //doesn't support fractional seconds then res_adjust returns 0 |
| 107 | //doesn't support fractional seconds then res_adjust is 0 |
108 | 108 | //and all the fractional seconds return 0. |
109 | | int adjust = static_cast< int >(resolution_traits_type::res_adjust() / 1000000); |
| 109 | int adjust = static_cast< int >(resolution_traits_type::res_adjust / 1000000); |
110 | 110 | |
111 | 111 | time_duration_type td(static_cast< typename time_duration_type::hour_type >(curr_ptr->tm_hour), |
112 | 112 | static_cast< typename time_duration_type::min_type >(curr_ptr->tm_min), |
diff --git a/boost/date_time/time_duration.hpp b/boost/date_time/time_duration.hpp
index 2b8870d..5cb4fce 100644
a
|
b
|
|
11 | 11 | |
12 | 12 | #include <boost/cstdint.hpp> |
13 | 13 | #include <boost/operators.hpp> |
| 14 | #include <boost/static_assert.hpp> |
14 | 15 | #include <boost/date_time/time_defs.hpp> |
15 | 16 | #include <boost/date_time/special_defs.hpp> |
16 | 17 | #include <boost/date_time/compiler_config.hpp> |
… |
… |
namespace date_time {
|
74 | 75 | //! Return the number of ticks in a second |
75 | 76 | static tick_type ticks_per_second() |
76 | 77 | { |
77 | | return rep_type::res_adjust(); |
| 78 | return rep_type::res_adjust; |
78 | 79 | } |
79 | 80 | //! Provide the resolution of this duration type |
80 | 81 | static time_resolutions resolution() |
… |
… |
namespace date_time {
|
267 | 268 | public: |
268 | 269 | typedef typename base_duration::traits_type traits_type; |
269 | 270 | explicit subsecond_duration(boost::int64_t ss) : |
270 | | base_duration(0,0,0,ss*traits_type::res_adjust()/frac_of_second) |
271 | | {} |
| 271 | base_duration(0,0,0,ss * (traits_type::res_adjust / frac_of_second)) |
| 272 | { |
| 273 | BOOST_STATIC_ASSERT((traits_type::res_adjust % frac_of_second) == 0); |
| 274 | } |
272 | 275 | }; |
273 | 276 | |
274 | 277 | |
diff --git a/boost/date_time/time_resolution_traits.hpp b/boost/date_time/time_resolution_traits.hpp
index 37785d0..875dc07 100644
a
|
b
|
namespace date_time {
|
79 | 79 | typedef v_type min_type; |
80 | 80 | typedef v_type sec_type; |
81 | 81 | |
| 82 | static const fractional_seconds_type res_adjust = resolution_adjust; |
| 83 | |
82 | 84 | // bring in function from frac_sec_type traits structs |
83 | 85 | static fractional_seconds_type as_number(impl_type i) |
84 | 86 | { |
… |
… |
namespace date_time {
|
104 | 106 | { |
105 | 107 | return frac_digits; |
106 | 108 | } |
107 | | static fractional_seconds_type res_adjust() |
108 | | { |
109 | | return resolution_adjust; |
110 | | } |
| 109 | |
111 | 110 | //! Any negative argument results in a negative tick_count |
112 | 111 | static tick_type to_tick_count(hour_type hours, |
113 | 112 | min_type minutes, |
… |
… |
namespace date_time {
|
122 | 121 | fs = absolute_value(fs); |
123 | 122 | return (((((fractional_seconds_type(hours)*3600) |
124 | 123 | + (fractional_seconds_type(minutes)*60) |
125 | | + seconds)*res_adjust()) + fs) * -1); |
| 124 | + seconds)*res_adjust) + fs) * -1); |
126 | 125 | } |
127 | 126 | |
128 | 127 | return (((fractional_seconds_type(hours)*3600) |
129 | 128 | + (fractional_seconds_type(minutes)*60) |
130 | | + seconds)*res_adjust()) + fs; |
| 129 | + seconds)*res_adjust) + fs; |
131 | 130 | } |
132 | 131 | |
133 | 132 | }; |
diff --git a/boost/date_time/time_system_counted.hpp b/boost/date_time/time_system_counted.hpp
index e5ed20b..169f9f6 100644
a
|
b
|
namespace date_time {
|
88 | 88 | static int_type frac_sec_per_day() |
89 | 89 | { |
90 | 90 | int_type seconds_per_day = 60*60*24; |
91 | | int_type fractional_sec_per_sec(resolution_traits::res_adjust()); |
| 91 | int_type fractional_sec_per_sec(resolution_traits::res_adjust); |
92 | 92 | return seconds_per_day*fractional_sec_per_sec; |
93 | 93 | } |
94 | 94 | bool is_pos_infinity()const |