...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::date_time::subsecond_duration — Template for instantiating derived adjusting durations.
// In header: <boost/date_time/time_duration.hpp> template<typename base_duration, boost::int64_t frac_of_second> class subsecond_duration : public base_duration { public: // types typedef base_duration::impl_type impl_type; typedef base_duration::traits_type traits_type; // construct/copy/destruct template<typename T> explicit subsecond_duration(T const &, typename boost::enable_if< boost::is_integral< T >, void >::type * = BOOST_DATE_TIME_NULLPTR); // private member functions BOOST_STATIC_ASSERT_MSG((traits_type::ticks_per_second >=frac_of_second?traits_type::ticks_per_second%frac_of_second:frac_of_second%traits_type::ticks_per_second) = =0, \"The base duration resolution must be a multiple of the subsecond duration resolution"); BOOST_STATIC_CONSTANT(boost::int64_t, adjustment_ratio = (traits_type::ticks_per_second >=frac_of_second?traits_type::ticks_per_second/frac_of_second:frac_of_second/traits_type::ticks_per_second)); };
subsecond_duration
private member functionsBOOST_STATIC_ASSERT_MSG((traits_type::ticks_per_second >=frac_of_second?traits_type::ticks_per_second%frac_of_second:frac_of_second%traits_type::ticks_per_second) = =0, \"The base duration resolution must be a multiple of the subsecond duration resolution");
BOOST_STATIC_CONSTANT(boost::int64_t, adjustment_ratio = (traits_type::ticks_per_second >=frac_of_second?traits_type::ticks_per_second/frac_of_second:frac_of_second/traits_type::ticks_per_second));