![]() |
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 ; typedef ; typedef ; typedef ; typedef ; typedef ; typedef ; typedef ; typedef ; typedef ; // construct/copy/destruct (); (, , = , = ); (); (); // public member functions () ; () ; () ; () ; () ; () ; () ; () ; () ; () ; () ; () ; () ; (time_duration &) ; (time_duration &) ; () ; () ; () ; () ; (); (); (); () ; (); () ; () ; () ; () ; () ; () ; // public static functions (); (); (); (); };
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 functions() ;Returns number of hours in the duration.
() ;Returns normalized number of minutes.
() ;Returns normalized number of seconds (0..60)
() ;Returns total number of seconds truncating any fractional seconds.
() ;Returns total number of milliseconds truncating any fractional seconds.
() ;Returns total number of nanoseconds truncating any sub millisecond values.
() ;Returns total number of microseconds truncating any sub microsecond values.
() ;Returns count of fractional seconds at given resolution.
() ;
() ;
() ;
() ;
() ;
(time_duration & rhs) ;
(time_duration & rhs) ;
() ;unary- Allows for
time_duration
td = -td1 ( d) ;
( d) ;
( divisor) ;
( d);
( d);
( divisor);Division operations on a duration with an integer.
( rhs) ;Multiplication operations an a duration with an integer.
( divisor);
() ;
() ;Is ticks_ a special value?
() ;Is duration pos-infinity.
() ;Is duration neg-infinity.
() ;Is duration not-a-date-time.
() ;Used for special_values output.