Base time duration type. More...
#include <posix_time_config.hpp>
Public Types | |
typedef time_res_traits | rep_type |
typedef time_res_traits::day_type | day_type |
typedef time_res_traits::hour_type | hour_type |
typedef time_res_traits::min_type | min_type |
typedef time_res_traits::sec_type | sec_type |
typedef time_res_traits::fractional_seconds_type | fractional_seconds_type |
typedef time_res_traits::tick_type | tick_type |
typedef time_res_traits::impl_type | impl_type |
typedef time_duration | duration_type |
typedef time_res_traits | traits_type |
Public Member Functions | |
time_duration (hour_type hour, min_type min, sec_type sec, fractional_seconds_type fs=0) | |
time_duration () | |
time_duration (boost::date_time::special_values sv) | |
Construct from special_values. More... | |
hour_type | hours () const |
Returns number of hours in the duration. More... | |
min_type | minutes () const |
Returns normalized number of minutes. More... | |
sec_type | seconds () const |
Returns normalized number of seconds (0..60) More... | |
sec_type | total_seconds () const |
Returns total number of seconds truncating any fractional seconds. More... | |
tick_type | total_milliseconds () const |
Returns total number of milliseconds truncating any fractional seconds. More... | |
tick_type | total_nanoseconds () const |
Returns total number of nanoseconds truncating any sub millisecond values. More... | |
tick_type | total_microseconds () const |
Returns total number of microseconds truncating any sub microsecond values. More... | |
fractional_seconds_type | fractional_seconds () const |
Returns count of fractional seconds at given resolution. More... | |
duration_type | invert_sign () const |
bool | is_negative () const |
bool | operator< (const time_duration &rhs) const |
bool | operator== (const time_duration &rhs) const |
duration_type | operator- () const |
unary- Allows for time_duration td = -td1 More... | |
duration_type | operator- (const duration_type &d) const |
duration_type | operator+ (const duration_type &d) const |
duration_type | operator/ (int divisor) const |
duration_type | operator-= (const duration_type &d) |
duration_type | operator+= (const duration_type &d) |
duration_type | operator/= (int divisor) |
Division operations on a duration with an integer. More... | |
duration_type | operator* (int rhs) const |
Multiplication operations an a duration with an integer. More... | |
duration_type | operator*= (int divisor) |
tick_type | ticks () const |
bool | is_special () const |
Is ticks_ a special value? More... | |
bool | is_pos_infinity () const |
Is duration pos-infinity. More... | |
bool | is_neg_infinity () const |
Is duration neg-infinity. More... | |
bool | is_not_a_date_time () const |
Is duration not-a-date-time. More... | |
impl_type | get_rep () const |
Used for special_values output. More... | |
Static Public Member Functions | |
static duration_type | unit () |
Returns smallest representable duration. More... | |
static tick_type | ticks_per_second () |
Return the number of ticks in a second. More... | |
static time_resolutions | resolution () |
Provide the resolution of this duration type. More... | |
static unsigned short | num_fractional_digits () |
Returns number of possible digits in fractional seconds. More... | |
Protected Member Functions | |
time_duration (impl_type tick_count) | |
Protected Attributes | |
impl_type | ticks_ |
Friends | |
class | date_time::time_duration< time_duration, time_res_traits > |
Base time duration type.
|
inherited |
typedef time_res_traits::fractional_seconds_type boost::posix_time::time_duration::fractional_seconds_type |
|
inherited |
|
inline |
|
inline |
|
inline |
Construct from special_values.
|
inlineexplicitprotected |
|
inlineinherited |
Returns count of fractional seconds at given resolution.
References boost::date_time::time_duration< T, rep_type >::ticks(), and boost::date_time::time_duration< T, rep_type >::ticks_per_second().
|
inlineinherited |
Used for special_values output.
References boost::date_time::time_duration< T, rep_type >::ticks_.
|
inlineinherited |
Returns number of hours in the duration.
References boost::date_time::time_duration< T, rep_type >::ticks(), and boost::date_time::time_duration< T, rep_type >::ticks_per_second().
|
inlineinherited |
|
inlineinherited |
Is duration neg-infinity.
References boost::date_time::time_duration< T, rep_type >::ticks_.
|
inlineinherited |
|
inlineinherited |
Is duration not-a-date-time.
References boost::date_time::time_duration< T, rep_type >::ticks_.
|
inlineinherited |
Is duration pos-infinity.
References boost::date_time::time_duration< T, rep_type >::ticks_.
|
inlineinherited |
Is ticks_ a special value?
References boost::date_time::time_duration< T, rep_type >::ticks_.
|
inlineinherited |
Returns normalized number of minutes.
References boost::date_time::time_duration< T, rep_type >::ticks(), and boost::date_time::time_duration< T, rep_type >::ticks_per_second().
|
inlinestaticinherited |
Returns number of possible digits in fractional seconds.
Referenced by boost::posix_time::to_iso_string_type(), and boost::posix_time::to_simple_string_type().
|
inlineinherited |
Multiplication operations an a duration with an integer.
References boost::date_time::time_duration< T, rep_type >::ticks_.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
unary- Allows for time_duration td = -td1
References boost::date_time::time_duration< T, rep_type >::ticks_.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Division operations on a duration with an integer.
References boost::date_time::time_duration< T, rep_type >::ticks_.
|
inlineinherited |
|
inlineinherited |
|
inlinestaticinherited |
Provide the resolution of this duration type.
|
inlineinherited |
Returns normalized number of seconds (0..60)
References boost::date_time::time_duration< T, rep_type >::ticks(), and boost::date_time::time_duration< T, rep_type >::ticks_per_second().
|
inlineinherited |
|
inlinestaticinherited |
Return the number of ticks in a second.
|
inlineinherited |
Returns total number of microseconds truncating any sub microsecond values.
References boost::date_time::time_duration< T, rep_type >::ticks(), and boost::date_time::time_duration< T, rep_type >::ticks_per_second().
|
inlineinherited |
Returns total number of milliseconds truncating any fractional seconds.
References boost::date_time::time_duration< T, rep_type >::ticks(), and boost::date_time::time_duration< T, rep_type >::ticks_per_second().
|
inlineinherited |
Returns total number of nanoseconds truncating any sub millisecond values.
References boost::date_time::time_duration< T, rep_type >::ticks(), and boost::date_time::time_duration< T, rep_type >::ticks_per_second().
|
inlineinherited |
Returns total number of seconds truncating any fractional seconds.
References boost::date_time::time_duration< T, rep_type >::ticks(), and boost::date_time::time_duration< T, rep_type >::ticks_per_second().
|
inlinestaticinherited |
Returns smallest representable duration.
|
friend |
|
protectedinherited |