Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

Class template subsecond_duration

boost::date_time::subsecond_duration — Template for instantiating derived adjusting durations.

Synopsis

// 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));
};

Description

subsecond_duration public construct/copy/destruct

  1. template<typename T> 
      explicit subsecond_duration(T const & ss, 
                                  typename boost::enable_if< boost::is_integral< T >, void >::type * = BOOST_DATE_TIME_NULLPTR);

subsecond_duration private member functions

  1.  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");
  2.  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));

PrevUpHomeNext