Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Class template time_duration

boost::date_time::time_duration — Represents some amount of elapsed time measure to a given resolution.

Synopsis

// In header: <boost/date_time/time_duration.hpp>

template<typename T, typename rep_type> 
class time_duration : private  {
public:
  // types
  typedef void                              ;
  typedef T                                 ;               
  typedef rep_type                          ;                 
  typedef                 ;                    
  typedef                ;                   
  typedef                 ;                    
  typedef                 ;                    
  typedef  ;     
  typedef                ;                   
  typedef                ;                   

  // public member functions
  ();
  (, ,  = ,  = );
  ();
  BOOST_CXX14_CONSTEXPR  () ;
  BOOST_CXX14_CONSTEXPR  () ;
  BOOST_CXX14_CONSTEXPR  () ;
  BOOST_CXX14_CONSTEXPR  () ;
  BOOST_CXX14_CONSTEXPR  () ;
  BOOST_CXX14_CONSTEXPR  () ;
  BOOST_CXX14_CONSTEXPR  () ;
  BOOST_CXX14_CONSTEXPR  () ;
  BOOST_CXX14_CONSTEXPR  duration_type () ;
  BOOST_CXX14_CONSTEXPR  duration_type () ;
  BOOST_CONSTEXPR  bool () ;
  BOOST_CONSTEXPR  bool () ;
  BOOST_CONSTEXPR  bool () ;
  BOOST_CONSTEXPR  bool (const  time_duration &) ;
  BOOST_CONSTEXPR  bool (const  time_duration &) ;
  BOOST_CONSTEXPR  duration_type () ;
  BOOST_CONSTEXPR  duration_type (const  duration_type &) ;
  BOOST_CONSTEXPR  duration_type (const  duration_type &) ;
  BOOST_CONSTEXPR  duration_type (int) ;
  BOOST_CXX14_CONSTEXPR  duration_type (const  duration_type &);
  BOOST_CXX14_CONSTEXPR  duration_type (const  duration_type &);
  BOOST_CXX14_CONSTEXPR  duration_type (int);
  BOOST_CXX14_CONSTEXPR  duration_type (int) ;
  BOOST_CXX14_CONSTEXPR  duration_type (int);
  BOOST_CXX14_CONSTEXPR  () ;
  BOOST_CXX14_CONSTEXPR  bool () ;
  BOOST_CXX14_CONSTEXPR  bool () ;
  BOOST_CXX14_CONSTEXPR  bool () ;
  BOOST_CXX14_CONSTEXPR  bool () ;
  BOOST_CONSTEXPR  () ;

  // public static functions
  BOOST_CXX14_CONSTEXPR  duration_type ();
  BOOST_CXX14_CONSTEXPR  ();
  BOOST_CXX14_CONSTEXPR   ();
  BOOST_CXX14_CONSTEXPR  unsigned  short ();

  // protected member functions
  ();
};

Description

This class represents a standard set of capabilities for all counted time durations. Time duration implementations should derive from this class passing their type as the first template parameter. This design allows the subclass duration types to provide custom construction policies or other custom features not provided here.

Template Parameters

  1. typename T

    The subclass type

  2. typename rep_type

    The time resolution traits for this duration type.

time_duration public member functions

  1. ();
  2. ( hours_in,  minutes_in,  seconds_in = , 
                   frac_sec_in = );
  3. ( sv);
    Construct from special_values.
  4. BOOST_CXX14_CONSTEXPR  () ;
    Returns number of hours in the duration.
  5. BOOST_CXX14_CONSTEXPR  () ;
    Returns normalized number of minutes.
  6. BOOST_CXX14_CONSTEXPR  () ;
    Returns normalized number of seconds (0..60)
  7. BOOST_CXX14_CONSTEXPR  () ;
    Returns total number of seconds truncating any fractional seconds.
  8. BOOST_CXX14_CONSTEXPR  () ;
    Returns total number of milliseconds truncating any fractional seconds.
  9. BOOST_CXX14_CONSTEXPR  () ;
    Returns total number of nanoseconds truncating any sub millisecond values.
  10. BOOST_CXX14_CONSTEXPR  () ;
    Returns total number of microseconds truncating any sub microsecond values.
  11. BOOST_CXX14_CONSTEXPR  () ;
    Returns count of fractional seconds at given resolution.
  12. BOOST_CXX14_CONSTEXPR  duration_type () ;
  13. BOOST_CXX14_CONSTEXPR  duration_type () ;
  14. BOOST_CONSTEXPR  bool () ;
  15. BOOST_CONSTEXPR  bool () ;
  16. BOOST_CONSTEXPR  bool () ;
  17. BOOST_CONSTEXPR  bool (const  time_duration & rhs) ;
  18. BOOST_CONSTEXPR  bool (const  time_duration & rhs) ;
  19. BOOST_CONSTEXPR  duration_type () ;
    unary- Allows for time_duration td = -td1
  20. BOOST_CONSTEXPR  duration_type (const  duration_type & d) ;
  21. BOOST_CONSTEXPR  duration_type (const  duration_type & d) ;
  22. BOOST_CONSTEXPR  duration_type (int divisor) ;
  23. BOOST_CXX14_CONSTEXPR  duration_type (const  duration_type & d);
  24. BOOST_CXX14_CONSTEXPR  duration_type (const  duration_type & d);
  25. BOOST_CXX14_CONSTEXPR  duration_type (int divisor);
    Division operations on a duration with an integer.
  26. BOOST_CXX14_CONSTEXPR  duration_type (int rhs) ;
    Multiplication operations an a duration with an integer.
  27. BOOST_CXX14_CONSTEXPR  duration_type (int divisor);
  28. BOOST_CXX14_CONSTEXPR  () ;
  29. BOOST_CXX14_CONSTEXPR  bool () ;
    Is ticks_ a special value?
  30. BOOST_CXX14_CONSTEXPR  bool () ;
    Is duration pos-infinity.
  31. BOOST_CXX14_CONSTEXPR  bool () ;
    Is duration neg-infinity.
  32. BOOST_CXX14_CONSTEXPR  bool () ;
    Is duration not-a-date-time.
  33. BOOST_CONSTEXPR  () ;
    Used for special_values output.

time_duration public static functions

  1. BOOST_CXX14_CONSTEXPR  duration_type ();
    Returns smallest representable duration.
  2. BOOST_CXX14_CONSTEXPR  ();
    Return the number of ticks in a second.
  3. BOOST_CXX14_CONSTEXPR   ();
    Provide the resolution of this duration type.
  4. BOOST_CXX14_CONSTEXPR  unsigned  short ();
    Returns number of possible digits in fractional seconds.

time_duration protected member functions

  1. ( in);

PrevUpHomeNext