![]() |
Home | Libraries | People | FAQ | More |
boost::date_time::time_duration — Represents some amount of elapsed time measure to a given resolution.
// 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 ; // construct/copy/destruct (); (, , = , = ); (); (); // 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 (); };
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.
typename T
The subclass type
typename rep_type
The time resolution traits for this duration type.
time_duration
public member functionsBOOST_CXX14_CONSTEXPR () ;Returns number of hours in the duration.
BOOST_CXX14_CONSTEXPR () ;Returns normalized number of minutes.
BOOST_CXX14_CONSTEXPR () ;Returns normalized number of seconds (0..60)
BOOST_CXX14_CONSTEXPR () ;Returns total number of seconds truncating any fractional seconds.
BOOST_CXX14_CONSTEXPR () ;Returns total number of milliseconds truncating any fractional seconds.
BOOST_CXX14_CONSTEXPR () ;Returns total number of nanoseconds truncating any sub millisecond values.
BOOST_CXX14_CONSTEXPR () ;Returns total number of microseconds truncating any sub microsecond values.
BOOST_CXX14_CONSTEXPR () ;Returns count of fractional seconds at given resolution.
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 & rhs) ;
BOOST_CONSTEXPR bool (const time_duration & rhs) ;
BOOST_CONSTEXPR duration_type () ;unary- Allows for
time_duration
td = -td1 BOOST_CONSTEXPR duration_type (const duration_type & d) ;
BOOST_CONSTEXPR duration_type (const duration_type & d) ;
BOOST_CONSTEXPR duration_type (int divisor) ;
BOOST_CXX14_CONSTEXPR duration_type (const duration_type & d);
BOOST_CXX14_CONSTEXPR duration_type (const duration_type & d);
BOOST_CXX14_CONSTEXPR duration_type (int divisor);Division operations on a duration with an integer.
BOOST_CXX14_CONSTEXPR duration_type (int rhs) ;Multiplication operations an a duration with an integer.
BOOST_CXX14_CONSTEXPR duration_type (int divisor);
BOOST_CXX14_CONSTEXPR () ;
BOOST_CXX14_CONSTEXPR bool () ;Is ticks_ a special value?
BOOST_CXX14_CONSTEXPR bool () ;Is duration pos-infinity.
BOOST_CXX14_CONSTEXPR bool () ;Is duration neg-infinity.
BOOST_CXX14_CONSTEXPR bool () ;Is duration not-a-date-time.
BOOST_CONSTEXPR () ;Used for special_values output.
time_duration
public static functionsBOOST_CXX14_CONSTEXPR duration_type ();Returns smallest representable duration.
BOOST_CXX14_CONSTEXPR ();Return the number of ticks in a second.
BOOST_CXX14_CONSTEXPR ();Provide the resolution of this duration type.
BOOST_CXX14_CONSTEXPR unsigned short ();Returns number of possible digits in fractional seconds.